Stealthy fix of list_dir on windows with single letter directories.

This commit is contained in:
Adam 2022-10-04 21:06:23 -04:00
parent 293110feaa
commit e34a3ca78f
1 changed files with 1 additions and 1 deletions

View File

@ -515,7 +515,7 @@ static int f_list_dir(lua_State *L) {
#ifdef _WIN32
lua_settop(L, 1);
if (strchr("\\/", path[strlen(path) - 2]) != NULL)
if (path[0] == 0 || strchr("\\/", path[strlen(path) - 1]) != NULL)
lua_pushstring(L, "*");
else
lua_pushstring(L, "/*");