Thread overview
[Issue 19910] ImportVisitor example fails to parse random files
Oct 06, 2019
GoaLitiuM
Dec 17, 2022
Iain Buclaw
Apr 18, 2023
RazvanN
October 06, 2019
https://issues.dlang.org/show_bug.cgi?id=19910

--- Comment #1 from GoaLitiuM <goalitium@dissues.mail.kapsi.fi> ---
It looks like the Parser expects the input string to be null-terminated, so the extra garbage is just random data past the given string. Simply appending the null character to the file content fixes this, so maybe the example needs to be adjusted for that?

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=19910

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3

--
April 18, 2023
https://issues.dlang.org/show_bug.cgi?id=19910

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |razvan.nitu1305@gmail.com
         Resolution|---                         |FIXED

--- Comment #2 from RazvanN <razvan.nitu1305@gmail.com> ---
This has been fixed by https://github.com/dlang/dmd/pull/15106. More
specifically:
https://github.com/dlang/dmd/pull/15106/files#diff-dbba1e589df96236acc395645a3108265c5884faa8eeac6eefb279ec7abd61daR110
.

--