Merge pull request #133 from lioncash/trunc-float

CTextParser: Resolve double->float truncation within ParseTag()
This commit is contained in:
Phillip Stephens 2020-01-30 20:11:39 -08:00 committed by GitHub
commit b1322a5613
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ void CTextParser::ParseTag(CTextExecuteBuffer& out, const char16_t* str, int len
out.AddColorOverride(val, color); out.AddColorOverride(val, color);
} }
} else if (BeginsWith(str, len, u"line-spacing=")) { } else if (BeginsWith(str, len, u"line-spacing=")) {
out.AddLineSpacing(ParseInt(str + 13, len - 13, true) / 100.0); out.AddLineSpacing(ParseInt(str + 13, len - 13, true) / 100.0f);
} else if (BeginsWith(str, len, u"line-extra-space=")) { } else if (BeginsWith(str, len, u"line-extra-space=")) {
out.AddLineExtraSpace(ParseInt(str + 17, len - 17, true)); out.AddLineExtraSpace(ParseInt(str + 17, len - 17, true));
} else if (BeginsWith(str, len, u"just=")) { } else if (BeginsWith(str, len, u"just=")) {