summaryrefslogtreecommitdiff
path: root/src/misc.c
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-10-23 16:59:04 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-10-23 16:59:04 (GMT)
commitb549688fddecbf98b79183bae0d4894f5b1ab154 (patch)
tree35f64d820c7c5cdf6be4b9e66f4ab82302a30a26 /src/misc.c
parent58d667281f9f450072bcd580030175252e404064 (diff)
downloadpowder-b549688fddecbf98b79183bae0d4894f5b1ab154.zip
powder-b549688fddecbf98b79183bae0d4894f5b1ab154.tar.gz
Compatibility with MSVC - devast8a
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);