BUG: Need to clear read failure when string is reset.

This commit is contained in:
Brad King 2007-04-19 12:56:07 -04:00
parent 6984c09310
commit a43b3cc801
1 changed files with 6 additions and 0 deletions

View File

@ -68,6 +68,12 @@ int testIOS(int, char*[])
kwsys_ios::cerr << "Able to read past end of stream" << kwsys_ios::endl;
return 1;
}
else
{
// Clear the failure.
istr.clear(istr.rdstate() & ~kwsys_ios::ios::eofbit);
istr.clear(istr.rdstate() & ~kwsys_ios::ios::failbit);
}
istr.str("30");
if(istr >> x)
{