소스 검색

* fix range check error if cstringpattern is empty

git-svn-id: trunk@14850 -
pierre 15 년 전
부모
커밋
f8144cc627
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      compiler/scanner.pas

+ 4 - 1
compiler/scanner.pas

@@ -3855,7 +3855,10 @@ In case not, the value returned can be arbitrary.
                                 begin
                                   if not iswidestring then
                                    begin
-                                     ascii2unicode(@cstringpattern[1],len,patternw);
+                                     if len>0 then
+                                       ascii2unicode(@cstringpattern[1],len,patternw)
+                                     else
+                                       ascii2unicode(nil,len,patternw);
                                      iswidestring:=true;
                                      len:=0;
                                    end;