Fixed bug caused by crlf member not being reset after reading an unsafe string. Tests are working again.

This commit is contained in:
Nathan Osman 2013-07-15 22:49:42 -07:00
parent 12df269ae0
commit 3458be07d8
2 changed files with 4 additions and 2 deletions

View File

@ -73,6 +73,7 @@ bool Lexer::readUnsafeString()
else
emit unsafeString(s);
crlf = 0;
return true;
}

View File

@ -33,11 +33,12 @@ void Parser::readUnsafeString(const QString & value)
tos().count = value.toInt();
else
{
Task::Action action = tos().action;
stack.removeLast();
if(tos().action == Task::ReadStatus)
if(action == Task::ReadStatus)
emit status(value);
else if(tos().action == Task::ReadError)
else if(action == Task::ReadError)
{
int pos = value.indexOf(' ');
emit error(value.left(pos), value.right(pos + 1));