bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #62158] PHP indented heredoc ending marker are not handled correctl


From: Cédric Anne
Subject: [bug #62158] PHP indented heredoc ending marker are not handled correctly
Date: Thu, 26 Jan 2023 16:40:06 -0500 (EST)

Follow-up Comment #1, bug #62158 (project gettext):

As far as I understand the code, maybe the fix could be simple as proposed in
following diff.
Anyway, I do not have any skills in C development and I just spent 1 hours
trying to compile the lib without success, so any help would be appreciated.

```diff gettext-tools/src/x-php.c
diff --git a/gettext-tools/src/x-php.c b/gettext-tools/src/x-php.c
index 78cce8e1d..e247d8fa7 100644
--- a/gettext-tools/src/x-php.c
+++ b/gettext-tools/src/x-php.c
@@ -1203,6 +1203,8 @@ phase4_get (token_ty *tp)
                             while (bufidx < bufpos)
                               {
                                 c = phase1_getc ();
+                                if (c == ' ')
+                                  continue;
                                 if (c == EOF)
                                   break;
                                 if (c != buffer[bufidx])
```


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62158>

_______________________________________________
Message posté via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]