소스 검색

* fixed potential endless loop if the code page passed to win2iconv()
is not found

git-svn-id: trunk@19195 -

Jonas Maebe 14 년 전
부모
커밋
3469942f34
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      rtl/unix/winiconv.inc

+ 4 - 4
rtl/unix/winiconv.inc

@@ -364,12 +364,12 @@
         ccp:=win2iconv_arr[i].cp;
         if cp=ccp then
           break;
-        if cp>ccp then
-          l:=i+1
+        if cp>=ccp then
+          l:=i
         else
           h:=i-1;
-      until l>h;
-      if l<=h then
+      until l>=h;
+      if cp=win2iconv_arr[i].cp then
         begin
           { the array has been ordered so that in case multiple alias names
             exist, the first entry for the cp is the most commonly supported