From a43b3cc801ad07086227536b05bff9ab584bf221 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 19 Apr 2007 12:56:07 -0400 Subject: BUG: Need to clear read failure when string is reset. --- Source/kwsys/testIOS.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/kwsys/testIOS.cxx b/Source/kwsys/testIOS.cxx index 7c02a1b..e4e0a2d 100644 --- a/Source/kwsys/testIOS.cxx +++ b/Source/kwsys/testIOS.cxx @@ -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) { -- cgit v0.12