diff options
| -rw-r--r-- | table.c | 7 |
1 files changed, 5 insertions, 2 deletions
| @@ -3,7 +3,7 @@ | |||
| 3 | ** Module to control static tables | 3 | ** Module to control static tables |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | char *rcs_table="$Id: table.c,v 1.3 1994/03/28 15:15:59 celes Exp celes $"; | 6 | char *rcs_table="$Id: table.c,v 1.4 1994/04/06 12:55:08 celes Exp celes $"; |
| 7 | 7 | ||
| 8 | #include <stdlib.h> | 8 | #include <stdlib.h> |
| 9 | #include <string.h> | 9 | #include <string.h> |
| @@ -232,7 +232,10 @@ char *lua_createstring (char *s) | |||
| 232 | 232 | ||
| 233 | for (i=0; i<lua_nstring; i++) | 233 | for (i=0; i<lua_nstring; i++) |
| 234 | if (streq(s,lua_string[i])) | 234 | if (streq(s,lua_string[i])) |
| 235 | return s; | 235 | { |
| 236 | free(s-1); | ||
| 237 | return lua_string[i]; | ||
| 238 | } | ||
| 236 | 239 | ||
| 237 | if (lua_nstring >= MAXSTRING-1) | 240 | if (lua_nstring >= MAXSTRING-1) |
| 238 | { | 241 | { |
