Bläddra i källkod

* solution in r29126 was brute force, fixed

git-svn-id: trunk@29128 -
florian 10 år sedan
förälder
incheckning
4d5f1f04fe
1 ändrade filer med 6 tillägg och 8 borttagningar
  1. 6 8
      rtl/objpas/sysutils/sysstr.inc

+ 6 - 8
rtl/objpas/sysutils/sysstr.inc

@@ -1328,14 +1328,12 @@ Begin
         while Result[1] = ' ' do
           System.Delete(Result, 1, 1);
 
-        { not Nan etc.? }
-        if Pos('.', Result)<>0 then
-          begin
-            if Result[1] = '-' then
-              Result[3] := DS
-            else
-              Result[2] := DS;
-          end;
+        if (Result[1]='-') and
+          { not Nan etc.? }
+          (Result[3]='.') then
+          Result[3] := DS
+        else if Result[2]='.' then
+          Result[2] := DS;
 
         P:=Pos('E',Result);
         if P <> 0 then