Author: gschneider
Date: Mon Dec 8 13:44:13 2008
New Revision: 37944
URL:
http://svn.reactos.org/svn/reactos?rev=37944&view=rev
Log:
- IntGetDeviceGammaRamp: remove unneeded code, i * 256 is always smaller than 65535
(255*256=65280 is the biggest value), CID 35
- IntSetDeviceGammaRamp: don't copy data to NULL buffer, CID 195
Modified:
trunk/reactos/subsystems/win32/win32k/objects/icm.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/icm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/icm.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/icm.c [iso-8859-1] Mon Dec 8 13:44:13
2008
@@ -118,7 +118,6 @@
for(i=0; i<256; i++ )
{
int NewValue = i * 256;
- if (NewValue > 65535) NewValue = 65535;
Ramp->Red[i] = Ramp->Green[i] = Ramp->Blue[i] = ((WORD)NewValue);
}
@@ -350,7 +349,8 @@
pGDev->pvGammaRamp = ExAllocatePoolWithTag(PagedPool, sizeof(GAMMARAMP),
TAG_GDIICM);
pGDev->flFlags |= PDEV_GAMMARAMP_TABLE;
}
- RtlCopyMemory( pGDev->pvGammaRamp, Ramp, sizeof(GAMMARAMP));
+ if (pGDev->pvGammaRamp)
+ RtlCopyMemory( pGDev->pvGammaRamp, Ramp, sizeof(GAMMARAMP));
Ret = UpdateDeviceGammaRamp(hPDev);