diff regexParser/grepWalk.cc @ 317:fa590a7272ae

fix
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 08 May 2016 11:40:38 +0900
parents c4d33b7c3ccd
children 7b8234c090f7
line wrap: on
line diff
--- a/regexParser/grepWalk.cc	Sat May 07 19:41:48 2016 +0900
+++ b/regexParser/grepWalk.cc	Sun May 08 11:40:38 2016 +0900
@@ -53,10 +53,9 @@
                     WordPtr w;
                     for (w = &cc->cond.w;w;w = w->next) {
                         // match the word.
-                        // if (not match) continue;
-                        if (strncmp((const char *)w->word,(const char *)tsv.buff.buffptr-1,w->length)) break;
+                        if (strncmp((const char *)w->word,(const char *)tsv.buff.buffptr-1,w->length)==0) break;
                     }
-                    if (!w) continue;
+                    if (!w) continue; // if (not match) continue;
                     tsv.buff.buffptr += w->length - 1;
                 }
                 state = nextState(cc->nextState,tg);