From ad2531a0eefb6950d589c0d508b1f959f3f58d8b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 3 May 2011 13:01:57 -0300 Subject: more complete (and hopefuly more correct) handling of 'sizeof(char)' --- lua.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lua.c') diff --git a/lua.c b/lua.c index c41a32a6..46783fc2 100644 --- a/lua.c +++ b/lua.c @@ -1,5 +1,5 @@ /* -** $Id: lua.c,v 1.196 2011/02/07 12:27:13 roberto Exp roberto $ +** $Id: lua.c,v 1.197 2011/03/14 15:39:42 roberto Exp roberto $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -246,7 +246,7 @@ static const char *get_prompt (lua_State *L, int firstline) { /* mark in error messages for incomplete statements */ #define EOFMARK "" -#define marklen (sizeof(EOFMARK) - 1) +#define marklen (sizeof(EOFMARK)/sizeof(char) - 1) static int incomplete (lua_State *L, int status) { if (status == LUA_ERRSYNTAX) { -- cgit v1.2.3-55-g6feb