summaryrefslogtreecommitdiffstats
path: root/qtools/qstring.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2001-01-07 17:28:47 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2001-01-07 17:28:47 (GMT)
commiteab6039875f05c8776119469fff0df8761b9b3a2 (patch)
treee0730802a8bb7eac348a5e39cffb88118aa42020 /qtools/qstring.cpp
parente4cebf12a245705a0ecb714cd3794750af9d0844 (diff)
downloadDoxygen-eab6039875f05c8776119469fff0df8761b9b3a2.zip
Doxygen-eab6039875f05c8776119469fff0df8761b9b3a2.tar.gz
Doxygen-eab6039875f05c8776119469fff0df8761b9b3a2.tar.bz2
Release-1.2.4-20010107
Diffstat (limited to 'qtools/qstring.cpp')
-rw-r--r--qtools/qstring.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/qtools/qstring.cpp b/qtools/qstring.cpp
index 85962b2..e13ffc8 100644
--- a/qtools/qstring.cpp
+++ b/qtools/qstring.cpp
@@ -13928,8 +13928,14 @@ uint QString::toUInt( bool *ok, int base ) const
double QString::toDouble( bool *ok ) const
{
char *end;
- const char *a = latin1();
- double val = strtod( a ? a : "", &end );
+
+ QCString a = latin1();
+ // Just latin1() is not sufficient, since U0131 would look like '1'.
+ for (uint i=0; i<d->len; i++)
+ if ( d->unicode[i].row() )
+ a[(int)i]='z';
+
+ double val = strtod( a.data() ? a.data() : "", &end );
if ( ok )
*ok = ( a && *a && ( end == 0 || *end == '\0' ) );
return val;