diff options
Diffstat (limited to 'strlib.c')
-rw-r--r-- | strlib.c | 7 |
1 files changed, 4 insertions, 3 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.44 1997/06/18 21:20:45 roberto Exp roberto $"; | 6 | char *rcs_strlib="$Id: strlib.c,v 1.45 1997/06/19 17:45:28 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <string.h> | 8 | #include <string.h> |
9 | #include <stdio.h> | 9 | #include <stdio.h> |
@@ -390,10 +390,11 @@ static void add_s (lua_Object newp, lua_Object table, int n) | |||
390 | struct lbuff oldbuff; | 390 | struct lbuff oldbuff; |
391 | int status; | 391 | int status; |
392 | lua_beginblock(); | 392 | lua_beginblock(); |
393 | if (lua_istable(table)) | 393 | if (lua_istable(table)) { |
394 | lua_pushobject(table); | 394 | lua_pushobject(table); |
395 | lua_pushnumber(n); | ||
396 | } | ||
395 | push_captures(); | 397 | push_captures(); |
396 | lua_pushnumber(n); | ||
397 | /* function may use lbuffer, so save it and create a new one */ | 398 | /* function may use lbuffer, so save it and create a new one */ |
398 | oldbuff = lbuffer; | 399 | oldbuff = lbuffer; |
399 | lbuffer.b = NULL; lbuffer.max = lbuffer.size = 0; | 400 | lbuffer.b = NULL; lbuffer.max = lbuffer.size = 0; |