YAML: Add assertion
@@ -151,6 +151,7 @@ static parserType * getNextChar (parserType * parser)
static parserType * putBackChars (parserType * parser, size_t numberChars)
{
ASSERT_NOT_NULL (parser);
+ ELEKTRA_ASSERT (parser->buffer - numberChars >= parser->bufferBase, "Can not put back more characters than available.");
parser->bufferCharsAvailable += numberChars;
parser->buffer -= numberChars;
