Fix some problems with typecast handling.

- If the given type had no modifiers specified, the base type string
  wasn't being moved out of the input buffer, leading to it mistakenly
  being parsed as a modifier. This would result in errors for simple
  cases such as a cast to size_t. Thanks Axel for reporting.
This commit is contained in:
Rene Gollent
2013-04-24 22:07:27 -04:00
parent bbaaaf2eae
commit 95098f927d
@@ -50,11 +50,10 @@ CLanguageFamily::ParseTypeExpression(const BString& expression,
modifierIndex = parsedName.FindFirst('&');
if (modifierIndex == -1)
modifierIndex = parsedName.FindFirst('[');
if (modifierIndex == -1)
modifierIndex = parsedName.Length();
if (modifierIndex >= 0)
parsedName.MoveInto(baseTypeName, 0, modifierIndex);
else
baseTypeName = parsedName;
parsedName.MoveInto(baseTypeName, 0, modifierIndex);
modifierIndex = parsedName.FindFirst('[');
if (modifierIndex >= 0) {