Fix unformat-at-eof bug

Change-Id: Id9a64303b1d415b55a3bc0ea1483df6fc2eb5011
Signed-off-by: Dave Barach <dave@barachs.net>
This commit is contained in:
Dave Barach
2016-10-26 14:03:20 -04:00
committed by Chris Luke
parent f62ae1288a
commit dddcceadf1

View File

@ -988,7 +988,7 @@ unformat_user (unformat_input_t * input, unformat_function_t * func, ...)
result = func (input, &va);
va_end (va);
if (!result)
if (!result && input->index != UNFORMAT_END_OF_INPUT)
input->index = input->buffer_marks[l];
_vec_len (input->buffer_marks) = l;