소스 검색

+ Patch from Colin Western for case sensitive color codes

michael 22 년 전
부모
커밋
2995d4ec4d
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      fcl/image/fpreadxpm.pp

+ 6 - 2
fcl/image/fpreadxpm.pp

@@ -268,8 +268,12 @@ var l : TStringList;
       begin
       code := copy(s, p, cpp);
       inc(p,cpp);
-      color := Palette.indexof (code);
-      img.pixels[r-1,imgindex] := color;
+      for color := 0 to Palette.Count-1 do
+        { Can't use indexof, as compare must be case sensitive }
+        if code = Palette[color] then begin
+          img.pixels[r-1,imgindex] := color;
+          Break;
+        end;
       end;
   end;