diff options
author | sanine <sanine.not@pm.me> | 2021-08-24 16:54:33 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2021-08-24 16:54:33 -0500 |
commit | 9149147708e7a74a1276835a2dbecc4d7fa1a3bb (patch) | |
tree | e79b7493792765508716703ca9a7e9d803cbd1f3 /src/hs_parse_args.c | |
parent | 9782f9ff35b1fdfa67438ea620bd7c91497781a3 (diff) |
fix hs_parse_arg string handling and function test
Diffstat (limited to 'src/hs_parse_args.c')
-rw-r--r-- | src/hs_parse_args.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hs_parse_args.c b/src/hs_parse_args.c index eee34e9..5a14bd0 100644 --- a/src/hs_parse_args.c +++ b/src/hs_parse_args.c @@ -24,7 +24,7 @@ static bool check_parse(lua_State *L, int index, struct hs_arg *expected) return true; case HS_STR: - if (!lua_isstring(L, index)) + if (!lua_isstring(L, index) || lua_isnumber(L, index)) return false; *(expected->ptr.string) = (char *) lua_tostring(L, index); return true; |