Explorar o código

* solution in r29126 was brute force, fixed

git-svn-id: trunk@29128 -
florian %!s(int64=11) %!d(string=hai) anos
pai
achega
4d5f1f04fe
Modificáronse 1 ficheiros con 6 adicións e 8 borrados
  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