Get scoreboard bar working

This commit is contained in:
elasota
2019-12-27 00:30:31 -05:00
parent 48f01567f7
commit 7bc647b026
9 changed files with 80 additions and 22 deletions

View File

@@ -897,7 +897,11 @@ short StringWidth(const PLPasStr &str)
if (!rfont)
return 0;
return rfont->MeasureString(str.UChars(), str.Length());
const size_t width = rfont->MeasureString(str.UChars(), str.Length());
if (width > SHRT_MAX)
return SHRT_MAX;
return static_cast<short>(width);
}
void GetMouse(Point *point)