summaryrefslogtreecommitdiff
path: root/src/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc.c')
-rw-r--r--src/misc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/misc.c b/src/misc.c
index 9e5842c..3c8e589 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -122,7 +122,9 @@ void save_presets(int do_update)
{
char * outputdata;
cJSON *root, *userobj, *versionobj;
- root = cJSON_CreateObject();
+ FILE* f;
+
+ root = cJSON_CreateObject();
cJSON_AddStringToObject(root, "Powder Toy Preferences", "Don't modify this file unless you know what you're doing. P.S: editing the admin/mod fields in your user info doesn't give you magical powers");
@@ -163,7 +165,7 @@ void save_presets(int do_update)
outputdata = cJSON_Print(root);
cJSON_Delete(root);
- FILE *f = fopen("powder.pref", "wb");
+ f = fopen("powder.pref", "wb");
if(!f)
return;
fwrite(outputdata, 1, strlen(outputdata), f);