mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
isleapp: Use binary mode for iniFP
Windows treats newlines differently then on *nix systems. Using binary mode makes this consistent. Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
This commit is contained in:
parent
eb7ae0a5f5
commit
6bb7a61908
@ -549,7 +549,7 @@ void IsleApp::LoadConfig()
|
|||||||
// Load sane defaults if dictionary failed to load
|
// Load sane defaults if dictionary failed to load
|
||||||
if (!dict) {
|
if (!dict) {
|
||||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Loading sane defaults");
|
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Loading sane defaults");
|
||||||
FILE* iniFP = fopen(iniConfig, "w");
|
FILE* iniFP = fopen(iniConfig, "wb");
|
||||||
|
|
||||||
if (!iniFP) {
|
if (!iniFP) {
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to write config at '%s': %s", iniConfig, strerror(errno));
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to write config at '%s': %s", iniConfig, strerror(errno));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user