mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Fix bug #8089: Handle spaces at the end of the stream
If the stream is good (i.e. there are still tokens) and we expect an argument, we call getArg(). However, if there are only spaces, the stream suddenly isn't good anymore after 'skipSpaces' and we would get an error when calling 'getChar'. Therefore we have to check whether the stream is still good.
This commit is contained in:
parent
1ef930c058
commit
26dcfcd343
@ -544,9 +544,12 @@ char_type Parser::getChar()
|
||||
|
||||
docstring Parser::getArg(char_type left, char_type right)
|
||||
{
|
||||
docstring result;
|
||||
skipSpaces();
|
||||
|
||||
docstring result;
|
||||
if (!good())
|
||||
return result;
|
||||
|
||||
char_type c = getChar();
|
||||
|
||||
if (c != left)
|
||||
|
Loading…
Reference in New Issue
Block a user