Fixed crash.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 23 Dec 2013 23:47:51 -0500
changeset 15 e2973f4fb366
parent 14 f359fb8eec3c
child 16 f5a7ede6c1f3
Fixed crash.
1pass.c
--- a/1pass.c	Mon Dec 23 20:44:04 2013 -0500
+++ b/1pass.c	Mon Dec 23 23:47:51 2013 -0500
@@ -28,7 +28,7 @@
 
 static inline int retvalString(lua_State *L, const char *str)
 {
-    return retvalStringBytes(L, (const uint8_t *) str, strlen(str));
+    return retvalStringBytes(L, (const uint8_t *) str, str ? strlen(str) : 0);
 } // retvalString
 
 static inline int retvalPointer(lua_State *L, void *ptr)