diff options
Diffstat (limited to 'lstrlib.c')
-rw-r--r-- | lstrlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -744,7 +744,7 @@ static int str_find_aux (lua_State *L, int find) { | |||
744 | const char *p = luaL_checklstring(L, 2, &lp); | 744 | const char *p = luaL_checklstring(L, 2, &lp); |
745 | size_t init = posrelatI(luaL_optinteger(L, 3, 1), ls) - 1; | 745 | size_t init = posrelatI(luaL_optinteger(L, 3, 1), ls) - 1; |
746 | if (init > ls) { /* start after string's end? */ | 746 | if (init > ls) { /* start after string's end? */ |
747 | lua_pushnil(L); /* cannot find anything */ | 747 | luaL_pushfail(L); /* cannot find anything */ |
748 | return 1; | 748 | return 1; |
749 | } | 749 | } |
750 | /* explicit request or no special characters? */ | 750 | /* explicit request or no special characters? */ |
@@ -779,7 +779,7 @@ static int str_find_aux (lua_State *L, int find) { | |||
779 | } | 779 | } |
780 | } while (s1++ < ms.src_end && !anchor); | 780 | } while (s1++ < ms.src_end && !anchor); |
781 | } | 781 | } |
782 | lua_pushnil(L); /* not found */ | 782 | luaL_pushfail(L); /* not found */ |
783 | return 1; | 783 | return 1; |
784 | } | 784 | } |
785 | 785 | ||