remove unnecessary null-check on get_table_mapchr_opt()

`name` here is always non-null, otherwise it leads segv at earlier code.
This commit is contained in:
SHIRAKATA Kentaro
2022-02-10 05:35:17 +09:00
parent 5dc94f3d83
commit 027b325a3d

View File

@@ -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");