summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReuben Thomas <rrt@sc3d.org>2013-01-07 14:51:07 +0000
committerReuben Thomas <rrt@sc3d.org>2013-01-07 14:51:54 +0000
commitcdd65f33ec817c31820e2a7673c33a63df72c12c (patch)
tree23d77d4aac9a771609ae3806c58cab0877537130
parent89f28e82cc27c346faf761cd6bdfe16dd13a10d9 (diff)
downloadlrexlib-cdd65f33ec817c31820e2a7673c33a63df72c12c.tar.gz
src/common.c: play safe and use 0 osize argument to lalloc when allocating
-rw-r--r--src/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common.c b/src/common.c
index 6e6ff8d..c50ea61 100644
--- a/src/common.c
+++ b/src/common.c
@@ -30,7 +30,7 @@ void set_int_field (lua_State *L, const char* field, int val)
void *Lmalloc(lua_State *L, size_t size) {
void *ud;
lua_Alloc lalloc = lua_getallocf(L, &ud);
- void *p = lalloc(ud, NULL, LUA_TUSERDATA, size);
+ void *p = lalloc(ud, NULL, 0, size);
if(p == NULL)
luaL_error(L, "malloc failed");
return p;