فهرست منبع

* Patch from Ondrej Pokorny to fix HtmlToFPColor (bug ID 34388)

git-svn-id: trunk@39973 -
michael 7 سال پیش
والد
کامیت
5cc137f54d
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      packages/fcl-image/src/fpimage.pp

+ 4 - 1
packages/fcl-image/src/fpimage.pp

@@ -721,7 +721,10 @@ function TryHtmlToFPColor(const S: String; out FPColor: TFPColor): Boolean;
   begin
     Val('$'+Hex, W, Code);
     Result := (Code = 0);
-    if not Result then W := 0;
+    if Result then
+      W := W or (W shl 8)
+    else
+      W := 0;
   end;
 
 var