fixed a stupid bug

svn path=/trunk/; revision=1770
This commit is contained in:
Jason Filby 2001-04-01 15:18:35 +00:00
parent 6ca8f2a32b
commit da6d4130c3

View file

@ -107,14 +107,8 @@ XLATEOBJ *EngCreateXlate(USHORT DestPalType, USHORT SourcePalType,
NewXlate = CreateGDIHandle(XlateGDI, XlateObj); NewXlate = CreateGDIHandle(XlateGDI, XlateObj);
if(SourcePalType == PAL_INDEXED) if(SourcePalType == PAL_INDEXED) SourcePalGDI = AccessInternalObject(PaletteSource);
{ if(DestPalType == PAL_INDEXED) DestPalGDI = AccessInternalObject(PaletteDest);
SourcePalGDI = AccessInternalObject(PaletteSource);
} else
if(DestPalType == PAL_INDEXED)
{
DestPalGDI = AccessInternalObject(PaletteDest);
}
XlateObj->iSrcType = SourcePalType; XlateObj->iSrcType = SourcePalType;
XlateObj->iDstType = DestPalType; XlateObj->iDstType = DestPalType;
@ -138,10 +132,8 @@ XLATEOBJ *EngCreateXlate(USHORT DestPalType, USHORT SourcePalType,
if( (SourcePalType == PAL_INDEXED) || (SourcePalType == PAL_RGB) ) if( (SourcePalType == PAL_INDEXED) || (SourcePalType == PAL_RGB) )
{ {
XlateObj->flXlate |= XO_TABLE; XlateObj->flXlate |= XO_TABLE;
if (SourcePalType == PAL_INDEXED) IndexedColors = SourcePalGDI->NumColors; if (SourcePalType == PAL_INDEXED) IndexedColors = SourcePalGDI->NumColors;
if (DestPalType == PAL_INDEXED) IndexedColors = DestPalGDI->NumColors; if (DestPalType == PAL_INDEXED) IndexedColors = DestPalGDI->NumColors;
XlateGDI->translationTable = EngAllocMem(FL_ZERO_MEMORY, sizeof(ULONG)*IndexedColors, NULL); XlateGDI->translationTable = EngAllocMem(FL_ZERO_MEMORY, sizeof(ULONG)*IndexedColors, NULL);
} }