InsightSoftwareConsortium/ITKMontage

Parsing Fiji File will cause crash if not on native platform

imikejackson opened this issue · 2 comments

The parsing code uses std::readline() which is not cross platform compatible. The issue is that I write a Fiji file on Windows and it has CRLF as the line endings. Then I try to read it on macOS or Linux and the code will crash because readline() is looking for CR instead of CRLF that the file has.

Cross platform specific codes should be written to do the parsing instead of std::readline(). Every platform has "\n" so break the text using that, then strip off the '\r' character if any.

Didn't 4df8755 fix it?

Fixed by #106.