[patch] bits/istream.tcc - getline(char_type*,streamsize,char_type)

brent verner brent@rcfile.org
Sat Jul 1 12:34:00 GMT 2000


I ran across a bug with ifstream::getline(...). Basically, when reading
a partial line with n as max readlength, n-2 chars will be stored if 
char n-1 is the delimiter. The following patch corrects this. The
testsuite can be used to verify the new behavior, as prescribed by
27.6.1.3 of the std.

cheers.
-- 
Damon Brent Verner
Cracker Jack® Certified Professional
brent@rcfile.org, brent@linux1.org


More information about the Libstdc++ mailing list