Erik Hofman schrieb:
Ralf Gerlich wrote:

Unfortunately that seems to break skipping the blank lines which are in the standard apt.dat-files. I get an "Unknown line in file:"-message when the reader encounters the first blank line after the version line.


Odd, I don't see that, are you using Windows or MacOS?

None of them...Linux...obviously Robin's apt.dat (DAFIF cycle 200505) contain '\r\n' at the end of the line (DOS-convention) and the istream::getline(char*,streamsize) implementation of the Linux libstdc++ for g++-3.4 reads all characters until the '\n' - at least according to the <istream> header file.

Possibly the implementations on the other platforms using different conventions handle this differently, masking the error on some platforms.

I've attached a patch for a simple fix, also fixing the "problem" with the space-only lines.

Ralf

Attachment: apt_loader-patch.bin
Description: Binary data

_______________________________________________
Flightgear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to