From a299cf6d211cfa38d4e07281750770c3efac379b Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano@redhat.com>
Date: Wed, 22 Jan 2014 15:34:22 +0100
Subject: [PATCH] builder: fix small regression in subkey parsing
Introduced in 5cbdf35d651b6c730d62d9af4876039faa122efc, it caused the
first character of the value to be skipped if the key has a subkey.
(cherry picked from commit 9e4357ca54282c1ab053dd5a8ebd64a323830cf4)
---
builder/index-scan.l | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builder/index-scan.l b/builder/index-scan.l
index 7a9618f..e43f82e 100644
--- a/builder/index-scan.l
+++ b/builder/index-scan.l
@@ -65,7 +65,7 @@ extern void yyerror (const char *);
if (yytext[i] == '[') {
size_t j = strcspn (yytext+i+1, "]");
yylval.field->subkey = strndup (yytext+i+1, j);
- i += 1+j+2;
+ i += 1+j+1;
} else {
yylval.field->subkey = NULL;
}
--
1.8.5.3