From: Bruno Haible Date: Sun, 6 Oct 2019 02:20:01 +0000 (+0200) Subject: xgettext: Fix bug in shell script parser (regression from 2019-09-15). X-Git-Tag: v0.21~146 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2077fbca8393cb561fb7a4f504017d1da93543a3;p=thirdparty%2Fgettext.git xgettext: Fix bug in shell script parser (regression from 2019-09-15). * gettext-tools/src/x-sh.c (read_command): Set matters_for_argparser = false when context_iter is not being initialized. --- diff --git a/gettext-tools/src/x-sh.c b/gettext-tools/src/x-sh.c index ce8a864d4..341f7027f 100644 --- a/gettext-tools/src/x-sh.c +++ b/gettext-tools/src/x-sh.c @@ -1327,8 +1327,10 @@ read_command (int looking_for, flag_context_ty outer_context) arg = 0; if (inner.type == t_assignment) { - /* An assignment just set an environment variable. + /* An assignment just sets an environment variable. Ignore it. */ + /* Don't increment arg in this round. */ + matters_for_argparser = false; } else if (inner.type == t_string) { @@ -1338,6 +1340,8 @@ read_command (int looking_for, flag_context_ty outer_context) { /* The 'env' command just introduces more assignments. Ignore it. */ + /* Don't increment arg in this round. */ + matters_for_argparser = false; } else {