Jelajahi Sumber

Changed the return value of find_aux to be the start position instead of the end position.

mingodad 13 tahun lalu
induk
melakukan
3879873511
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      squirrel/lua-regex.c

+ 1 - 1
squirrel/lua-regex.c

@@ -426,7 +426,7 @@ eofunc:
           if (init < ls) goto do_again;
       }
   }
-  return result;
+  return result > 0 ? ms->start_pos : result; //returning the start position
 }