Commit Graph

1 Commits

Author SHA1 Message Date
Moritz Bunkus
5934eddc75 mm_text_io_c: fix seeking in UTF-16/-32 encoded files
The `getline` function tries to handle different line ending
styles (carriage returns, new lines, a mix of both). For that it has
to probe one more character after having found one of them. If that
probed character is not one of them, then the previous position has to
be restored — and that was wrongfully assuming that each character is
only one byte long. Which it isn't.

Fixes #2160.
2017-12-01 14:37:16 +01:00