Include name of unknown tag in the error message when parsig a formar string
Resolves: rhbz#855305
This commit is contained in:
parent
a8accc3d72
commit
73674678b2
|
@ -390,7 +390,10 @@ static int parseFormat(headerSprintfArgs hsa, char * str,
|
|||
token->type = PTOK_TAG;
|
||||
|
||||
if (findTag(hsa, token, start)) {
|
||||
hsa->errmsg = _("unknown tag");
|
||||
/* Use static buffer as hsa->errmsg is const char * */
|
||||
static char errmsg[1024];
|
||||
snprintf(errmsg, 1024, _("unknown tag: \"%s\""), start);
|
||||
hsa->errmsg = (const char *)(&errmsg);
|
||||
goto errxit;
|
||||
}
|
||||
|
||||
|
|
|
@ -369,7 +369,7 @@ runroot rpm \
|
|||
],
|
||||
[0],
|
||||
[],
|
||||
[error: incorrect format: unknown tag
|
||||
[error: incorrect format: unknown tag: "notag"
|
||||
])
|
||||
AT_CLEANUP
|
||||
|
||||
|
|
Loading…
Reference in New Issue