From 8b49d06375685d4dc0ddd71a9b7310663dc92d51 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 24 Feb 2014 11:25:28 +0100 Subject: [PATCH] b64: fix segfault caused by signed char --- lua-b64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua-b64.c b/lua-b64.c index ce74481..cb03f4f 100644 --- a/lua-b64.c +++ b/lua-b64.c @@ -28,7 +28,7 @@ static const char *urlsafe_base64_tbl = static int b64_encode_tbl(lua_State *L, const char *tbl) { size_t len, n = 0; - const char *src = luaL_checklstring(L, 1, &len); + const unsigned char *src = (const unsigned char *)luaL_checklstring(L, 1, &len); luaL_Buffer dst; unsigned int triplet = 0; unsigned int pad; -- 1.8.5.4