From 027b325a3dee3935e7526e5a8fcb48a65ea93c4f Mon Sep 17 00:00:00 2001 From: SHIRAKATA Kentaro Date: Thu, 10 Feb 2022 05:35:17 +0900 Subject: [PATCH] remove unnecessary null-check on get_table_mapchr_opt() `name` here is always non-null, otherwise it leads segv at earlier code. --- src/nhlua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nhlua.c b/src/nhlua.c index dad9f55b6..ff8c985e9 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -239,7 +239,7 @@ get_table_mapchr_opt(lua_State *L, const char *name, schar defval) xint8 typ; ter = get_table_str_opt(L, name, emptystr); - if (name && ter && *ter) { + if (ter && *ter) { typ = (xint8) check_mapchr(ter); if (typ == INVALID_TYPE) nhl_error(L, "Erroneous map char");