summaryrefslogtreecommitdiffhomepage
path: root/Stars45/AudioConfig.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Stars45/AudioConfig.cpp')
-rw-r--r--Stars45/AudioConfig.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Stars45/AudioConfig.cpp b/Stars45/AudioConfig.cpp
index 7a7565a..d833533 100644
--- a/Stars45/AudioConfig.cpp
+++ b/Stars45/AudioConfig.cpp
@@ -233,7 +233,8 @@ AudioConfig::Load()
int blocklen = 0;
const char* filename = "audio.cfg";
- FILE* f = ::fopen(filename, "rb");
+ FILE* f;
+ ::fopen_s(&f, filename, "rb");
if (f) {
::fseek(f, 0, SEEK_END);
@@ -363,7 +364,8 @@ AudioConfig::Load()
void
AudioConfig::Save()
{
- FILE* f = fopen("audio.cfg", "w");
+ FILE* f;
+ fopen_s(&f, "audio.cfg", "w");
if (f) {
fprintf(f, "AUDIO\n\n");
fprintf(f, "menu_music: %3d\n", menu_music);