KngStr il y a 4 ans
Parent
commit
048a07a8e6
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      Source/ksString.pas

+ 2 - 2
Source/ksString.pas

@@ -306,7 +306,7 @@ begin
 
   LSize := Trim(AUnit);
   case Length(LSize) of
-    1,2: Result := SizeUnitToInt(LSize[Low(LSize)]);
+    1,2: Result := SizeUnitToInt(PChar(AUnit)^);
   end;
 end;
 
@@ -358,7 +358,7 @@ begin
     end;
 
   if s <> '' then
-    Result := StrToUInt64Def(s, Result) * SizeUnitToInt(c);
+    Result := StrToInt64Def(s, Result) * SizeUnitToInt(c);
 end;
 
 function GetStrParamStr(P: PChar; var Param: String): PChar;