summaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-03-06 11:46:54 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-03-06 11:46:54 -0300
commite9a38203700865d36c3b2861200674a21930c1b5 (patch)
treef538c91f7d3faa8221906ff8b93b24d419ebd8e7 /llex.c
parent9e8a46daa28e902b4a6d74134d96e80411789175 (diff)
downloadlua-github-e9a38203700865d36c3b2861200674a21930c1b5.tar.gz
sizeof(string) != strlen(string)+1 when sizeof(char) != 1
Diffstat (limited to 'llex.c')
-rw-r--r--llex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/llex.c b/llex.c
index 58cb9fb5..ab722b54 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
/*
-** $Id: llex.c,v 1.80 2001/02/23 17:17:25 roberto Exp roberto $
+** $Id: llex.c,v 1.81 2001/02/23 20:32:16 roberto Exp roberto $
** Lexical Analyzer
** See Copyright Notice in lua.h
*/
@@ -58,7 +58,7 @@ void luaX_checklimit (LexState *ls, int val, int limit, const l_char *msg) {
void luaX_syntaxerror (LexState *ls, const l_char *s, const l_char *token) {
l_char buff[MAXSRC];
- luaO_chunkid(buff, getstr(ls->source), sizeof(buff));
+ luaO_chunkid(buff, getstr(ls->source), MAXSRC);
luaO_verror(ls->L,
l_s("%.99s;\n last token read: `%.30s' at line %d in %.80s"),
s, token, ls->linenumber, buff);