lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 75d5a8924c27a5c3f60138afd9506e91b057373c
parent 880f82d089832d27e22df3f26cfc6c508465a63a
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Tue, 20 Oct 2015 11:10:39 -0200

macro 'addbuff' was using external variable name, instead of using
its parameter name inside the macro.

Diffstat:
Mlstate.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 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)];