KngStr 3 лет назад
Родитель
Сommit
048a07a8e6
1 измененных файлов с 2 добавлено и 2 удалено
  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;