1
0
forked from 0ad/0ad

Don't postpone rendering of icons when they are at the end of a GUI string.

Fixes #2502

This was SVN commit r16844.
This commit is contained in:
Nicolas Auvray 2015-07-12 07:38:04 +00:00
parent 9161cd7e24
commit 0682190def

View File

@ -83,7 +83,7 @@ void CGUIString::GenerateTextCall(const CGUI *pGUI,
// it's in the end of one word, and the icon
// should really belong to the beginning of the next one
if (_to == to && to >= 1)
if (_to == to && to >= 1 && to < m_RawString.length())
{
if (m_RawString[to-1] == ' ' ||
m_RawString[to-1] == '-' ||