bugfix: Issue #531

This commit is contained in:
Cloud Wu
2016-08-08 17:48:10 +08:00
parent 2f23367671
commit 283c3f10fe

View File

@@ -494,7 +494,7 @@ static int
lfromhex(lua_State *L) { lfromhex(lua_State *L) {
size_t sz = 0; size_t sz = 0;
const char * text = luaL_checklstring(L, 1, &sz); const char * text = luaL_checklstring(L, 1, &sz);
if (sz & 2) { if (sz & 1) {
return luaL_error(L, "Invalid hex text size %d", (int)sz); return luaL_error(L, "Invalid hex text size %d", (int)sz);
} }
char tmp[SMALL_CHUNK]; char tmp[SMALL_CHUNK];