From d68f3f42821ffaa7d68ffa48b0e5ceee0aa0ab9a Mon Sep 17 00:00:00 2001 From: onefang Date: Tue, 14 Sep 2021 13:56:34 +1000 Subject: Comment out the lua_isnumber() check. --- src/sledjchisl/sledjchisl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index f0a9f3f..476c728 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -1009,12 +1009,14 @@ int Lua2hashtbl(char *file, qhashtbl_t *hash, char *var) // Numbers can convert to strings, so check for numbers before checking for strings. // On the other hand, strings that can be converted to numbers also pass lua_isnumber(). sigh - if (lua_isnumber(L, -1)) // 0 +/* if (lua_isnumber(L, -1)) // 0 { float v = lua_tonumber(L, -1); // 0 hash->put(hash, n, &v, sizeof(float)); } - else if (lua_isstring(L, -1)) // 0 + else +*/ + if (lua_isstring(L, -1)) // 0 hash->putstr(hash, n, (char *) lua_tostring(L, -1)); // 0 else if (lua_isboolean(L, -1)) // 0 { -- cgit v1.1