Gfx: Additional change to 6e04fd9

This commit is contained in:
Birunthan Mohanathas 2013-08-10 14:14:02 +03:00
parent aa4c4a6dfc
commit 2e2ced7403

View File

@ -201,7 +201,7 @@ DWRITE_TEXT_METRICS TextFormatD2D::GetMetrics(
{
// GDI+ compatibility: If the last character is a newline, GDI+ measurements seem to ignore it.
bool strippedLastNewLine = false;
if (str[strLen - 1] == L'\n')
if (strLen > 2 && str[strLen - 1] == L'\n')
{
strippedLastNewLine = true;
--strLen;