aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lobject.c b/lobject.c
index 0c61ac0f..b3bacc08 100644
--- a/lobject.c
+++ b/lobject.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.c,v 2.41 2010/10/28 15:39:03 roberto Exp roberto $ 2** $Id: lobject.c,v 2.42 2010/10/29 11:13:14 roberto Exp roberto $
3** Some generic functions over Lua objects 3** Some generic functions over Lua objects
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -226,7 +226,7 @@ void luaO_chunkid (char *out, const char *source, size_t bufflen) {
226 else { /* string; format as [string "source"] */ 226 else { /* string; format as [string "source"] */
227 const char *nl = strchr(source, '\n'); /* find first new line (if any) */ 227 const char *nl = strchr(source, '\n'); /* find first new line (if any) */
228 addstr(out, PRE, LL(PRE)); /* add prefix */ 228 addstr(out, PRE, LL(PRE)); /* add prefix */
229 bufflen -= LL(PRE RETS POS); /* save space for prefix+suffix */ 229 bufflen -= LL(PRE RETS POS) + 1; /* save space for prefix+suffix+'\0' */
230 if (l < bufflen && nl == NULL) { /* small one-line source? */ 230 if (l < bufflen && nl == NULL) { /* small one-line source? */
231 addstr(out, source, l); /* keep it */ 231 addstr(out, source, l); /* keep it */
232 } 232 }