WORD is unsigned, so we need to transalte 0xffff into -1.

This commit is contained in:
Marcus Meissner 2000-09-26 22:45:05 +00:00 committed by Alexandre Julliard
parent 83f52d11c1
commit 13de9b3579
1 changed files with 3 additions and 0 deletions

View File

@ -837,6 +837,9 @@ INT WINAPI GetDeviceCaps( HDC hdc, INT cap )
FIXME("(%04x,%d): unsupported DeviceCaps capability, will yield 0!\n",
hdc,cap );
ret = *(WORD *)(((char *)dc->w.devCaps) + cap);
if ((cap == NUMCOLORS) && (ret == 0xffff))
ret = -1;
break;
}