From 75d5a8924c27a5c3f60138afd9506e91b057373c Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 20 Oct 2015 11:11:05 -0200 Subject: [PATCH] macro 'addbuff' was using external variable name, instead of using its parameter name inside the macro. --- lstate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lstate.c b/lstate.c index 576485dc..ac86edb4 100644 --- a/lstate.c +++ b/lstate.c @@ -1,5 +1,5 @@ /* -** $Id: lstate.c,v 2.129 2015/07/13 13:30:03 roberto Exp roberto $ +** $Id: lstate.c,v 2.130 2015/09/08 15:41:05 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -76,7 +76,7 @@ typedef struct LG { */ #define addbuff(b,p,e) \ { size_t t = cast(size_t, e); \ - memcpy(buff + p, &t, sizeof(t)); p += sizeof(t); } + memcpy(b + p, &t, sizeof(t)); p += sizeof(t); } static unsigned int makeseed (lua_State *L) { char buff[4 * sizeof(size_t)];