#257 Destructor is parsed and (by some magic) already used

master
Artur Czajka 2014-11-19 10:02:27 +01:00
parent d11a2f37f9
commit 7c8a31c074
1 changed files with 11 additions and 0 deletions

View File

@ -246,6 +246,17 @@ CBotToken* CBotToken::NextToken(char* &program, int& error, bool first)
mot = c; // built the word
c = *(program++); // next character
// special case for destructors
if ( mot[0] == '~')
{
while (c != 0 && !CharInList(c, sep1))
{
mot += c;
c = *(program++);
}
stop = true;
}
// special case for strings
if ( mot[0] == '\"' )
{