diff options
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 1.12 1997/11/26 20:44:52 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.13 1997/11/27 18:25:14 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 | */ |
@@ -381,6 +381,7 @@ int lua_dofile (char *filename) | |||
381 | 381 | ||
382 | 382 | ||
383 | #define SIZE_PREF 20 /* size of string prefix to appear in error messages */ | 383 | #define SIZE_PREF 20 /* size of string prefix to appear in error messages */ |
384 | #define SSIZE_PREF "20" | ||
384 | 385 | ||
385 | 386 | ||
386 | int lua_dostring (char *str) | 387 | int lua_dostring (char *str) |
@@ -390,7 +391,7 @@ int lua_dostring (char *str) | |||
390 | char *temp; | 391 | char *temp; |
391 | ZIO z; | 392 | ZIO z; |
392 | if (str == NULL) return 1; | 393 | if (str == NULL) return 1; |
393 | sprintf(buff, "(dostring) >> %.20s", str); | 394 | sprintf(buff, "(dostring) >> %." SSIZE_PREF "s", str); |
394 | temp = strchr(buff, '\n'); | 395 | temp = strchr(buff, '\n'); |
395 | if (temp) *temp = 0; /* end string after first line */ | 396 | if (temp) *temp = 0; /* end string after first line */ |
396 | luaZ_sopen(&z, str); | 397 | luaZ_sopen(&z, str); |