diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-12-13 13:54:21 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-12-13 13:54:21 -0200 |
commit | 5dfd17dd769d159a3b0722ddf82b385ff7271d53 (patch) | |
tree | 5e4329c717d7276191c711a80ea9323bf0560a4c /strlib.c | |
parent | ce4fb88b34421bc4426db7985314ba7ed757a284 (diff) | |
download | lua-5dfd17dd769d159a3b0722ddf82b385ff7271d53.tar.gz lua-5dfd17dd769d159a3b0722ddf82b385ff7271d53.tar.bz2 lua-5dfd17dd769d159a3b0722ddf82b385ff7271d53.zip |
new API function 'lua_pushliteral'
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; |