From 9149147708e7a74a1276835a2dbecc4d7fa1a3bb Mon Sep 17 00:00:00 2001 From: sanine Date: Tue, 24 Aug 2021 16:54:33 -0500 Subject: fix hs_parse_arg string handling and function test --- src/hs_parse_args.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/hs_parse_args.c') 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; -- cgit v1.2.1