aboutsummaryrefslogtreecommitdiffstats
path: root/vppinfra
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2016-10-26 14:03:20 -0400
committerChris Luke <chris_luke@comcast.com>2016-10-26 20:12:29 +0000
commitdddcceadf14488bf1d8c97387bd51176abd9b4be (patch)
treee04f913899ede136a16bd87230b44b616fe4d373 /vppinfra
parentf62ae1288a776527c7f7ba3951531fbd07bc63da (diff)
Fix unformat-at-eof bug
Change-Id: Id9a64303b1d415b55a3bc0ea1483df6fc2eb5011 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vppinfra')
-rw-r--r--vppinfra/vppinfra/unformat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vppinfra/vppinfra/unformat.c b/vppinfra/vppinfra/unformat.c
index 22d282a078f..ac8b7ddc712 100644
--- a/vppinfra/vppinfra/unformat.c
+++ b/vppinfra/vppinfra/unformat.c
@@ -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;