From 4466748ffbdd573c5438696a9e97f989d939e11e Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 25 May 2013 23:18:00 +0200 Subject: [PATCH] inpcom.c, unify skip_back() usage #2/2 --- src/frontend/inpcom.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index cc082c60e..a3237119a 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -1013,15 +1013,16 @@ inp_chk_for_multi_in_vcvs(struct line *deck, int *line_number) fprintf(stderr, "ERROR: mal formed line: %s\n", line); controlled_exit(EXIT_FAILURE); } - str_ptr2 = skip_back_ws(str_ptr2 - 1); + str_ptr2 = skip_back_ws(str_ptr2 - 1) + 1; str_ptr1 = skip_ws(str_ptr1 + 1); - if (*str_ptr2 == '}') { + if (str_ptr2[-1] == '}') { + str_ptr2--; while (*str_ptr2 != '{') str_ptr2--; xy_str1 = str_ptr2; str_ptr2 = skip_back_ws(xy_str1 - 1) + 1; } else { - xy_str1 = skip_back_non_ws(str_ptr2) + 1; + xy_str1 = skip_back_non_ws(str_ptr2 - 1) + 1; str_ptr2 = skip_back_ws(xy_str1 - 1) + 1; } keep = *str_ptr2;