From f9d64cdaa4d4998071c738de9897bcc59f019b8f Mon Sep 17 00:00:00 2001 From: ac_stef Date: Sun, 24 Aug 2008 21:33:51 +0000 Subject: [PATCH] don't write .cfg files of size 0 git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2381 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/worldio.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/src/worldio.cpp b/source/src/worldio.cpp index 2ad4c376..ef8dd96e 100644 --- a/source/src/worldio.cpp +++ b/source/src/worldio.cpp @@ -127,6 +127,7 @@ uchar *readmap(char *name, int *size) void writecfg(char *name, int size, uchar *data) { + if (!size) return; setnames(name); FILE *f = openfile(mcfname, "w"); if(!f) { conoutf("\f3could not write config to %s", mcfname); return; }