From e18d5b849db9e35f709c372ff74cd736172f5177 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 9 Dec 2007 13:30:00 +0000 Subject: [PATCH] Unicode version and a bug fix to loading --- src/common/kernel/save.c | 6 ++++-- src/common/kernel/version.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/common/kernel/save.c b/src/common/kernel/save.c index 767fdcff2..e1eac3729 100644 --- a/src/common/kernel/save.c +++ b/src/common/kernel/save.c @@ -1545,8 +1545,10 @@ readgame(const char * filename, int backup) /* recognize UTF8 BOM */ rss(F, token, sizeof(token)); - if (memcmp(token, utf8_bom, 3)==0 && enc_gamedata!=XML_CHAR_ENCODING_UTF8) { - encoding = XML_CHAR_ENCODING_UTF8; + if (memcmp(token, utf8_bom, 3)==0) { + if (enc_gamedata!=XML_CHAR_ENCODING_UTF8) { + encoding = XML_CHAR_ENCODING_UTF8; + } log_warning(("Found UTF-8 BOM, assuming unicode gamedata.\n")); global.data_version = atoi(token+3); } else { diff --git a/src/common/kernel/version.h b/src/common/kernel/version.h index c8931e06a..2cf8e0718 100644 --- a/src/common/kernel/version.h +++ b/src/common/kernel/version.h @@ -58,5 +58,5 @@ #ifdef ENEMIES # define RELEASE_VERSION ENEMIES_VERSION #else -# define RELEASE_VERSION CURSEFLAGS_VERSION +# define RELEASE_VERSION UNICODE_VERSION #endif