From 45fe7eaf7e04778c73abda08764bfd3a1da0ff53 Mon Sep 17 00:00:00 2001 From: Stas Degteff Date: Wed, 21 Mar 2007 08:07:21 +0000 Subject: [PATCH] Fix log message "Can't load language file ""\' --- golded3/gclang.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/golded3/gclang.cpp b/golded3/gclang.cpp index 2aadc63..4c71fc2 100644 --- a/golded3/gclang.cpp +++ b/golded3/gclang.cpp @@ -669,6 +669,13 @@ void LoadLanguage(const char* file) int line = 0; char buf[256]; + if (file==NULL || *file==0){ + LOG.printf("! LoadLanguage() is called with empty file name!"); + #if defined(GFTRK_ENABLE) + __gftrk_log(); + #endif + return; + } gfile fp(AddPath(CFG->goldpath, file), "rt", CFG->sharemode); if (fp.isopen()) { @@ -704,7 +711,7 @@ void LoadLanguage(const char* file) AssignDateNames(); } else - LOG.printf("Can't load language file \"%s\", OS reports: %s!", file, strerror(errno)); + LOG.printf("? Can't load language file \"%s\", OS reports: %s!", file, strerror(errno)); }