Bladeren bron

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

mingodad 13 jaren geleden
bovenliggende
commit
3879873511
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      squirrel/lua-regex.c

+ 1 - 1
squirrel/lua-regex.c

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