lib: json: Ignore spaces while scanning for tokens

The function to ignore spaces was not being called, so some tokens had
whitespace in the beginning.  They were correctly lexed, but parsing
could eventually fail.

Jira: ZEP-1607
Change-Id: I796596143895fa0fa652641f56af9a03e7a65b7a
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
This commit is contained in:
Leandro Pereira 2017-03-23 15:15:11 -07:00 committed by Anas Nashif
commit 4c7803b59f

View file

@ -261,6 +261,7 @@ static void *lexer_json(struct lexer *lexer)
/* fallthrough */
default:
if (isspace(chr)) {
ignore(lexer);
continue;
}