mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-03 07:50:29 +01:00
parent
b699364b1c
commit
ab6557fcd4
1 changed files with 4 additions and 6 deletions
10
os/oscolor.c
10
os/oscolor.c
|
|
@ -1590,19 +1590,17 @@ OsLookupColor(int screen,
|
|||
mid = (low + high) / 2;
|
||||
c = &BuiltinColors[mid];
|
||||
r = strncasecmp (&BuiltinColorNames[c->name], name, len);
|
||||
if (r == 0 && strlen (&BuiltinColorNames[c->name]) > len)
|
||||
r++;
|
||||
if (r == 0)
|
||||
if (r == 0 && len == strlen (&BuiltinColorNames[c->name]))
|
||||
{
|
||||
*pred = c->red * 0x101;
|
||||
*pgreen = c->green * 0x101;
|
||||
*pblue = c->blue * 0x101;
|
||||
return TRUE;
|
||||
}
|
||||
if (r > 0)
|
||||
high = mid - 1;
|
||||
else
|
||||
if (r < 0)
|
||||
low = mid + 1;
|
||||
else
|
||||
high = mid - 1;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue