aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2009-12-14 02:28:22 +0100
committerMike Pall <mike>2009-12-14 02:28:22 +0100
commit547508f36f8f565770833c653e804ec425af605b (patch)
treea1fde9ffdbbce4c3444cea7be01dc95c10c644e9
parentef885f476e63d1ccb3ba33d175a9dc1e1822e803 (diff)
downloadluajit-547508f36f8f565770833c653e804ec425af605b.tar.gz
luajit-547508f36f8f565770833c653e804ec425af605b.tar.bz2
luajit-547508f36f8f565770833c653e804ec425af605b.zip
Fix off-by-one error in err_chunkid().
-rw-r--r--src/lj_err.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_err.c b/src/lj_err.c
index 71c561b1..20be9e9a 100644
--- a/src/lj_err.c
+++ b/src/lj_err.c
@@ -204,7 +204,7 @@ static void err_chunkid(char *out, const char *src)
204 strcpy(out, src); 204 strcpy(out, src);
205 } else { /* out = [string "string"] */ 205 } else { /* out = [string "string"] */
206 size_t len; /* Length, up to first control char. */ 206 size_t len; /* Length, up to first control char. */
207 for (len = 0; len < LUA_IDSIZE-11; len++) 207 for (len = 0; len < LUA_IDSIZE-12; len++)
208 if (((const unsigned char *)src)[len] < ' ') break; 208 if (((const unsigned char *)src)[len] < ' ') break;
209 strcpy(out, "[string \""); out += 9; 209 strcpy(out, "[string \""); out += 9;
210 if (src[len] != '\0') { /* must truncate? */ 210 if (src[len] != '\0') { /* must truncate? */