Commit c1a2765c authored by Martin Schreiber's avatar Martin Schreiber

* No exception for invalid color in colortorgb() and colortopixel().

parent db7af4ad
......@@ -1918,10 +1918,15 @@ begin
dec(map,7);
if (map < cm_rgb) or (map > high(map)) or
(longword(color) >= longword(mapcolorcounts[map])) then begin
result:= colortorgb(cl_invalid);
{
gdierror(gde_invalidcolor,
hextostrmse(longword(color)+longword(map) shl speccolorshift,8));
}
end
else begin
result:= rgbtriplety(gui_pixeltorgb(colormaps[map][longword(color)]));
end;
result:= rgbtriplety(gui_pixeltorgb(colormaps[map][longword(color)]));
end;
end;
......@@ -1938,10 +1943,15 @@ begin
dec(map,7);
if (map < cm_rgb) or (map > high(map)) or
(longword(color) >= longword(mapcolorcounts[map])) then begin
result:= colortopixel(cl_invalid);
{
gdierror(gde_invalidcolor,
hextostrmse(longword(color)+longword(map) shl speccolorshift,8));
}
end
else begin
result:= colormaps[map][longword(color)];
end;
result:= colormaps[map][longword(color)];
end;
end;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment