Commit 511577da authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Correctly truncate tmFirstChar, tmLastChar, tmBreakChar at 255 in the

process of W->A conversion.
parent 28f8cf29
......@@ -235,10 +235,10 @@ static void FONT_TextMetricWToA(const TEXTMETRICW *ptmW, LPTEXTMETRICA ptmA )
ptmA->tmOverhang = ptmW->tmOverhang;
ptmA->tmDigitizedAspectX = ptmW->tmDigitizedAspectX;
ptmA->tmDigitizedAspectY = ptmW->tmDigitizedAspectY;
ptmA->tmFirstChar = ptmW->tmFirstChar;
ptmA->tmLastChar = ptmW->tmLastChar;
ptmA->tmDefaultChar = ptmW->tmDefaultChar;
ptmA->tmBreakChar = ptmW->tmBreakChar;
ptmA->tmFirstChar = ptmW->tmFirstChar > 255 ? 255 : ptmW->tmFirstChar;
ptmA->tmLastChar = ptmW->tmLastChar > 255 ? 255 : ptmW->tmLastChar;
ptmA->tmDefaultChar = ptmW->tmDefaultChar > 255 ? 255 : ptmW->tmDefaultChar;
ptmA->tmBreakChar = ptmW->tmBreakChar > 255 ? 255 : ptmW->tmBreakChar;
ptmA->tmItalic = ptmW->tmItalic;
ptmA->tmUnderlined = ptmW->tmUnderlined;
ptmA->tmStruckOut = ptmW->tmStruckOut;
......@@ -260,10 +260,10 @@ static void FONT_NewTextMetricExWTo16(const NEWTEXTMETRICEXW *ptmW, LPNEWTEXTMET
ptm16->ntmTm.tmOverhang = ptmW->ntmTm.tmOverhang;
ptm16->ntmTm.tmDigitizedAspectX = ptmW->ntmTm.tmDigitizedAspectX;
ptm16->ntmTm.tmDigitizedAspectY = ptmW->ntmTm.tmDigitizedAspectY;
ptm16->ntmTm.tmFirstChar = ptmW->ntmTm.tmFirstChar;
ptm16->ntmTm.tmLastChar = ptmW->ntmTm.tmLastChar;
ptm16->ntmTm.tmDefaultChar = ptmW->ntmTm.tmDefaultChar;
ptm16->ntmTm.tmBreakChar = ptmW->ntmTm.tmBreakChar;
ptm16->ntmTm.tmFirstChar = ptmW->ntmTm.tmFirstChar > 255 ? 255 : ptmW->ntmTm.tmFirstChar;
ptm16->ntmTm.tmLastChar = ptmW->ntmTm.tmLastChar > 255 ? 255 : ptmW->ntmTm.tmLastChar;
ptm16->ntmTm.tmDefaultChar = ptmW->ntmTm.tmDefaultChar > 255 ? 255 : ptmW->ntmTm.tmDefaultChar;
ptm16->ntmTm.tmBreakChar = ptmW->ntmTm.tmBreakChar > 255 ? 255 : ptmW->ntmTm.tmBreakChar;
ptm16->ntmTm.tmItalic = ptmW->ntmTm.tmItalic;
ptm16->ntmTm.tmUnderlined = ptmW->ntmTm.tmUnderlined;
ptm16->ntmTm.tmStruckOut = ptmW->ntmTm.tmStruckOut;
......
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