[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src/serialization string_utils.cpp
From: |
Philippe Plantier |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src/serialization string_utils.cpp |
Date: |
Sun, 24 Apr 2005 08:21:19 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Philippe Plantier <address@hidden> 05/04/24 12:21:19
Modified files:
src/serialization: string_utils.cpp
Log message:
In theory, nothing prevents wchar_t to be 16 bits and signed, so better
safe
than sorry.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/serialization/string_utils.cpp.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
Patches:
Index: wesnoth/src/serialization/string_utils.cpp
diff -u wesnoth/src/serialization/string_utils.cpp:1.20
wesnoth/src/serialization/string_utils.cpp:1.21
--- wesnoth/src/serialization/string_utils.cpp:1.20 Sun Apr 24 11:58:04 2005
+++ wesnoth/src/serialization/string_utils.cpp Sun Apr 24 12:21:19 2005
@@ -1,4 +1,4 @@
-/* $Id: string_utils.cpp,v 1.20 2005/04/24 11:58:04 gruikya Exp $ */
+/* $Id: string_utils.cpp,v 1.21 2005/04/24 12:21:19 gruikya Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Copyright (C) 2005 by Guillaume Melquiond <address@hidden>
@@ -561,7 +561,7 @@
#ifdef __APPLE__
// FIXME: Should we support towupper on recent OSX platforms?
wchar_t uchar = *itor;
- if(uchar < 256)
+ if(uchar >= 0 && uchar < 0x100)
uchar = toupper(uchar);
std::string res = utils::wchar_to_string(uchar);
#else
@@ -583,7 +583,7 @@
#ifdef __APPLE__
// FIXME: Should we support towupper on recent OSX
platforms?
wchar_t uchar = *itor;
- if(uchar < 256)
+ if(uchar >= 0 && uchar < 0x100)
uchar = toupper(uchar);
res += utils::wchar_to_string(uchar);
#else
@@ -606,7 +606,7 @@
#ifdef __APPLE__
// FIXME: Should we support towupper on recent OSX
platforms?
wchar_t uchar = *itor;
- if(uchar < 256)
+ if(uchar >= 0 && uchar < 0x100)
uchar = tolower(uchar);
res += utils::wchar_to_string(uchar);
#else