Wolfgang Ortmann пре 9 година
родитељ
комит
e7eeb3bb86
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      src/stringtools.cpp

+ 2 - 2
src/stringtools.cpp

@@ -126,8 +126,8 @@ long int getLongInt(const string& s, unsigned int& i)
 
 
 double getDouble(const string& s, unsigned int& i)
 double getDouble(const string& s, unsigned int& i)
 {
 {
-  if (!isdigit(s[i])||s[i]=='-')
-    throw Exception("getDouble", "digit expected");
+  if (!isdigit(s[i]) && s[i]!='-')
+    throw Exception("getDouble", "digit expected in " );
   string is;
   string is;
   while (i < s.size() && (isdigit(s[i]) || s[i]=='-' || s[i]=='.' || s[i]=='e' || s[i]=='E'))
   while (i < s.size() && (isdigit(s[i]) || s[i]=='-' || s[i]=='.' || s[i]=='e' || s[i]=='E'))
     {
     {