diff options
-rw-r--r-- | ldo.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 1.22 1998/01/27 21:21:27 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.23 1998/01/28 17:47:05 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -401,7 +401,10 @@ int lua_dostring (char *str) | |||
401 | if (str == NULL) return 1; | 401 | if (str == NULL) return 1; |
402 | sprintf(name, "(dostring) >> \"%." SSIZE_PREF "s\"", str); | 402 | sprintf(name, "(dostring) >> \"%." SSIZE_PREF "s\"", str); |
403 | temp = strchr(name, '\n'); | 403 | temp = strchr(name, '\n'); |
404 | if (temp) *temp = 0; /* end string after first line */ | 404 | if (temp) { /* end string after first line */ |
405 | *temp = '"'; | ||
406 | *(temp+1) = 0; | ||
407 | } | ||
405 | luaZ_sopen(&z, str, name); | 408 | luaZ_sopen(&z, str, name); |
406 | status = do_main(&z, 0); | 409 | status = do_main(&z, 0); |
407 | return status; | 410 | return status; |