]> granicus.if.org Git - onig/commitdiff
small fix for FinishCode position
authorK.Kosako <kosako@sofnec.co.jp>
Fri, 12 Jan 2018 06:54:13 +0000 (15:54 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Fri, 12 Jan 2018 06:54:13 +0000 (15:54 +0900)
src/regexec.c

index e7054ec0c9248efc895b1d13df717994397640cc..cc6207fe9fd9d8e64631317472d669968fd9f089 100644 (file)
@@ -1930,7 +1930,10 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
       fputs((char* )buf, stderr);
 
       for (i = 0; i < 20 - (bp - buf); i++) fputc(' ', stderr);
-      fprintf(stderr, "%4d: ", (int )(p - reg->p));
+      if (p == FinishCode)
+        fprintf(stderr, "----: ");
+      else
+        fprintf(stderr, "%4d: ", (int )(p - reg->p));
       onig_print_compiled_byte_code(stderr, p, NULL, reg->p, encode);
       fprintf(stderr, "\n");
     }