aboutsummaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldo.c')
-rw-r--r--ldo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ldo.c b/ldo.c
index 4a37fe5d..f813922e 100644
--- a/ldo.c
+++ b/ldo.c
@@ -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
386int lua_dostring (char *str) 387int 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);