diff options
Diffstat (limited to 'strlib.c')
-rw-r--r-- | strlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** String library to LUA | 3 | ** String library to LUA |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_strlib="$Id: strlib.c,v 1.4 1994/10/18 18:34:47 roberto Exp roberto $"; | 6 | char *rcs_strlib="$Id: strlib.c,v 1.5 1994/11/16 17:38:08 roberto Stab $"; |
7 | 7 | ||
8 | #include <string.h> | 8 | #include <string.h> |
9 | #include <ctype.h> | 9 | #include <ctype.h> |
@@ -67,7 +67,7 @@ static void str_sub (void) | |||
67 | start = lua_getnumber (o2); | 67 | start = lua_getnumber (o2); |
68 | end = o3 == NULL ? strlen(s) : lua_getnumber (o3); | 68 | end = o3 == NULL ? strlen(s) : lua_getnumber (o3); |
69 | if (end < start || start < 1 || end > strlen(s)) | 69 | if (end < start || start < 1 || end > strlen(s)) |
70 | lua_pushstring(""); | 70 | lua_pushliteral(""); |
71 | else | 71 | else |
72 | { | 72 | { |
73 | s[end] = 0; | 73 | s[end] = 0; |