[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src language.cpp
From: |
David White |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src language.cpp |
Date: |
Mon, 02 May 2005 19:59:48 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: David White <address@hidden> 05/05/02 23:59:48
Modified files:
src : language.cpp
Log message:
fixed Windows crash with campaigns that have [textdomains] that resolve
to empty paths
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/language.cpp.diff?tr1=1.86&tr2=1.87&r1=text&r2=text
Patches:
Index: wesnoth/src/language.cpp
diff -u wesnoth/src/language.cpp:1.86 wesnoth/src/language.cpp:1.87
--- wesnoth/src/language.cpp:1.86 Sat Apr 23 17:09:48 2005
+++ wesnoth/src/language.cpp Mon May 2 23:59:48 2005
@@ -1,4 +1,4 @@
-/* $Id: language.cpp,v 1.86 2005/04/23 17:09:48 silene Exp $ */
+/* $Id: language.cpp,v 1.87 2005/05/02 23:59:48 Sirp Exp $ */
/* vim:set encoding=utf-8: */
/*
Copyright (C) 2003 by David White <address@hidden>
@@ -244,8 +244,13 @@
if(path.empty()) {
t_string::add_textdomain(name, get_intl_dir());
} else {
- const std::string& location =
get_binary_file_location(path, ".");
- t_string::add_textdomain(name, location);
+ const std::string& location =
get_binary_file_location(path, ".");
+
+ //if location is empty, this causes a crash on Windows,
so we
+ //disallow adding empty domains
+ if(location.empty() == false) {
+ t_string::add_textdomain(name, location);
+ }
}
}
}
- [Wesnoth-cvs-commits] wesnoth/src language.cpp,
David White <=