This commit is contained in:
iceman1001 committed 2024-01-16 11:53:42 +01:00
1 parent e89ec244cd
commit 5b31211971
12 files changed
+143 -129

No files matched your search

+1 -1
View File
@@ -1333,7 +1333,7 @@ static int l_cwd(lua_State *L) {
while (GetCurrentDir(cwd, path_len) == NULL) {
if (errno == ERANGE) { // Need bigger buffer
path_len += 10; // if buffer was too small add 10 characters and try again
char* cwdNew = realloc(cwd, path_len);
char *cwdNew = realloc(cwd, path_len);
if (cwdNew == NULL) {
free(cwd);
return returnToLuaWithError(L, "Failed to allocate memory");