浏览代码

* Fix StrToDate incompatibility with delphi in case of trailing whitespace

git-svn-id: trunk@27745 -
michael 11 年之前
父节点
当前提交
47fd732236
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      rtl/objpas/sysutils/dati.inc

+ 2 - 0
rtl/objpas/sysutils/dati.inc

@@ -371,6 +371,8 @@ var
    YearMoreThenTwoDigits : boolean;
 begin
   ErrorMsg:='';   Result:=0;
+  While (Len>0) and (S[Len-1] in [' ',#8,#9,#10,#12,#13]) do
+    Dec(len);
   if (Len=0) then
     begin
       FixErrorMsg(SInvalidDateFormat,'');