mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 00:57:19 +02:00
Lexer: Fixed bug that allowed unterminated quotes strings, again
This commit is contained in:
parent
d3971d2384
commit
8afc7443e4
1 changed files with 4 additions and 2 deletions
|
@ -1218,8 +1218,10 @@ bool Lexer::readWord (
|
||||||
word += utf8_character (utf8_next_char (text, cursor));
|
word += utf8_character (utf8_next_char (text, cursor));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Word has to at least contain the quotes.
|
// Verify termination.
|
||||||
return word.length () >= 2 ? true : false;
|
return word[0] == quote &&
|
||||||
|
word[word.length () - 1] == quote &&
|
||||||
|
word.length () >= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue