]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
xgettext: Fix parsing of XML tags.
authorBruno Haible <bruno@clisp.org>
Sun, 29 Sep 2019 12:35:37 +0000 (14:35 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 29 Sep 2019 12:35:37 +0000 (14:35 +0200)
* gettext-tools/src/x-javascript.c (phase5_get): Fix lexical_context after
decrementing xml_element_depth.

gettext-tools/src/x-javascript.c

index 3b3d2097fd90b37e52d4c0875975234aa59f2af8..514fd30637ade0a028e402e1c73e142a36cf6eb8 100644 (file)
@@ -1323,7 +1323,7 @@ phase5_get (token_ty *tp)
                   break;
 
                 case lc_xml_close_tag:
-                  if (xml_element_depth-- > 0)
+                  if (--xml_element_depth > 0)
                     lexical_context = lc_xml_content;
                   else
                     lexical_context = lc_outside;
@@ -1348,7 +1348,7 @@ phase5_get (token_ty *tp)
                   c = phase2_getc ();
                   if (c == '>')
                     {
-                      if (xml_element_depth-- > 0)
+                      if (--xml_element_depth > 0)
                         lexical_context = lc_xml_content;
                       else
                         lexical_context = lc_outside;