Closed ovhpa closed 6 years ago
Hello,
On an ARMv7 machine (tegra2), gdis fails to detect EOF while loading help file (gdis.manual), which results in a infinite loop.
Replacing (c == EOF) by (feof(fp)) and (c != EOF) by (!feof(fp)) in the file_read_line function of file.c seems to be a workaround.
(c == EOF)
(feof(fp))
(c != EOF)
(!feof(fp))
Sincerely,
PS: it’s really a pleasure to see gdis running nicely on this kind of small machine!
https://github.com/arohl/gdis/blob/9f192f51753ff1b6e6cdb4f5b63b83ded349571a/src/file.c#L1120 https://github.com/arohl/gdis/blob/9f192f51753ff1b6e6cdb4f5b63b83ded349571a/src/file.c#L1125 https://github.com/arohl/gdis/blob/9f192f51753ff1b6e6cdb4f5b63b83ded349571a/src/file.c#L1132
suggested fix implemented
Hello,
On an ARMv7 machine (tegra2), gdis fails to detect EOF while loading help file (gdis.manual), which results in a infinite loop.
Replacing
(c == EOF)
by(feof(fp))
and(c != EOF)
by(!feof(fp))
in the file_read_line function of file.c seems to be a workaround.Sincerely,
PS: it’s really a pleasure to see gdis running nicely on this kind of small machine!
https://github.com/arohl/gdis/blob/9f192f51753ff1b6e6cdb4f5b63b83ded349571a/src/file.c#L1120 https://github.com/arohl/gdis/blob/9f192f51753ff1b6e6cdb4f5b63b83ded349571a/src/file.c#L1125 https://github.com/arohl/gdis/blob/9f192f51753ff1b6e6cdb4f5b63b83ded349571a/src/file.c#L1132