- [FIX] Memory corruption bug from SDL_Init() on Mac

This commit is contained in:
2022-12-27 21:49:26 +01:00
parent 0bbeaadcba
commit 0cd5d59b8d
2 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
mini.exe
mini
.vscode/*
info.plist

View File

@@ -31,7 +31,7 @@ FILE *file = NULL;
//uint8_t file_mode = 0;
bool file_ignore_comma=true;
char *lua_files=NULL;
char lua_files[1024];
#define DEST(x, y) dest_surface->p[x+y*dest_surface->w]
#define SOURCE(x, y) source_surface->p[x+y*source_surface->w]
@@ -97,7 +97,7 @@ void read_ini() {
else if (strcmp(line, "zoom") == 0) screen_zoom = atoi(value);
else if (strcmp(line, "hidemouse") == 0) show_cursor = SDL_DISABLE;
else if (strcmp(line, "files") == 0) {
lua_files = (char*)malloc(strlen(value));
//lua_files = (char*)malloc(strlen(value));
strcpy(lua_files, value);
}
}