Added handling of the case when length is -1, allowing the code to just test
against characters being zero, rather than against length, which is now only done when a valid value of length (i.e >=0) is passed in.
This commit is contained in:
@@ -213,7 +213,7 @@ void EncodedText::setText(const unsigned char* text, int length)
|
||||
|
||||
int character = getNextCharacter(text);
|
||||
int charCount = (int)(text-textStart);
|
||||
while ((character) && (charCount <= length))
|
||||
while ((character) && (length<0 || (charCount <= length)))
|
||||
{
|
||||
_unicodeText.push_back(character);
|
||||
character = getNextCharacter(text);
|
||||
|
||||
Reference in New Issue
Block a user