From 2bb31556caad644db0ce6d1c7dd55fcbca174e0e Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sun, 25 May 2014 00:08:10 -0700 Subject: Fixing a few warnings and errors. --- lcrypt/lcrypt_bits.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lcrypt/lcrypt_bits.c') diff --git a/lcrypt/lcrypt_bits.c b/lcrypt/lcrypt_bits.c index 0ea7851..9712933 100644 --- a/lcrypt/lcrypt_bits.c +++ b/lcrypt/lcrypt_bits.c @@ -126,7 +126,7 @@ static int lcrypt_bget(lua_State *L) else if(type == B_STR) { int len = (bits + 7) / 8; - uint8_t data[len]; + uint8_t * data = (uint8_t *)alloca(len); memset(data, 0, len); copy_bits(data, 0, in, offset, bits); lua_pushlstring(L, (char*)data, len); @@ -176,7 +176,7 @@ static int lcrypt_bput(lua_State *L) len += bits; } len = (len + 7) / 8; - uint8_t ret[len]; + uint8_t * ret = (uint8_t *)alloca(len); memset(ret, 0, len); for(i = 1; i <= argc; i += 3) -- cgit v1.2.3