From: Bruno Haible Date: Sat, 28 Nov 2009 14:14:04 +0000 (+0100) Subject: Fix a bug in the Perl extractor. X-Git-Tag: v0.18~106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a02937e79d1eb3ae204e98c5614154be10276d3a;p=thirdparty%2Fgettext.git Fix a bug in the Perl extractor. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index d67bdbe36..678a86157 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,8 @@ +2009-11-28 Bruno Haible + + * x-perl.c (extract_variable): Fix tp->type when returning at EOF. + Reported by Guido Flohr . + 2009-11-15 Bruno Haible * x-python.c: Update comments regarding PEP 0263. diff --git a/gettext-tools/src/x-perl.c b/gettext-tools/src/x-perl.c index 221108dc9..1830a108c 100644 --- a/gettext-tools/src/x-perl.c +++ b/gettext-tools/src/x-perl.c @@ -1381,7 +1381,10 @@ extract_variable (message_list_ty *mlp, token_ty *tp, int first) if (extract_balanced (mlp, token_type_rbrace, true, false, null_context, null_context_list_iterator, 1, arglist_parser_alloc (mlp, NULL))) - return; + { + tp->type = token_type_eof; + return; + } buffer[bufpos++] = c; } else