Fix to lua_pushconststring
authorMyhailo Danylenko <isbear@ukrpost.net>
Fri, 27 Mar 2009 09:43:25 +0200
changeset 15 1a5dd51722f5
parent 14 4cb715fed99b
child 16 09b375e9ce32
Fix to lua_pushconststring
util.h
--- a/util.h	Mon Mar 23 05:47:09 2009 +0200
+++ b/util.h	Fri Mar 27 09:43:25 2009 +0200
@@ -9,7 +9,7 @@
 #define enum_value_t int
 #endif
 
-#define lua_pushconststring(L, STRING) { lua_pushlstring (L, STRING, sizeof(STRING)); }
+#define lua_pushconststring(L, STRING) { lua_pushlstring (L, STRING, sizeof(STRING)-1); }
 
 // Array of string2eunm_t's must be ended with pair { NULL, fallback_value }
 typedef struct {