瀏覽代碼

* fix for 11099

git-svn-id: trunk@10605 -
marco 17 年之前
父節點
當前提交
99c4e92735
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      rtl/objpas/sysutils/sysformt.inc

+ 4 - 1
rtl/objpas/sysutils/sysformt.inc

@@ -58,7 +58,10 @@ Var ChPos,OldPos,ArgPos,DoArg,Len : SizeInt;
     Procedure ReadIndex;
     Procedure ReadIndex;
 
 
     begin
     begin
-      ReadInteger;
+      If Fmt[ChPos]<>':' then
+        ReadInteger
+      else
+        value:=0; // Delphi undocumented behaviour, assume 0, #11099
       If Fmt[ChPos]=':' then
       If Fmt[ChPos]=':' then
         begin
         begin
         If Value=-1 then DoFormatError(feMissingArgument);
         If Value=-1 then DoFormatError(feMissingArgument);