Fixed crash in test suite (#4595)

This commit is contained in:
PKEuS 2013-03-14 04:21:38 -07:00
parent 61d9424631
commit 0b22cb932e
1 changed files with 1 additions and 1 deletions

View File

@ -3004,7 +3004,7 @@ std::string Preprocessor::expandMacros(const std::string &code, std::string file
line.erase(pos1, pos2 - pos1);
// Don't glue this macro into variable or number after it
if (std::isalnum(line[pos1]) || line[pos1] == '_')
if (!line.empty() && (std::isalnum(line[pos1]) || line[pos1] == '_'))
macrocode.append(1,' ');
// insert expanded macro code