From: <pst...@us...> - 2010-07-18 22:00:50
|
Revision: 819 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=819&view=rev Author: pstieber Date: 2010-07-18 22:00:44 +0000 (Sun, 18 Jul 2010) Log Message: ----------- 1. Changed Is.eof() to !Is.eof() when reading initial quote. 2. Checked for any type of stream failure when reading the rest of the string. Modified Paths: -------------- trunk/jazz/src/StringReadWrite.cpp Modified: trunk/jazz/src/StringReadWrite.cpp =================================================================== --- trunk/jazz/src/StringReadWrite.cpp 2010-07-18 20:03:57 UTC (rev 818) +++ trunk/jazz/src/StringReadWrite.cpp 2010-07-18 22:00:44 UTC (rev 819) @@ -34,13 +34,13 @@ { // Ignore through the first quote (") character. Is >> Character; - } while (Character != '"' && Is.eof()); + } while (Character != '"' && !Is.eof()); // This is an intentional infinite loop. for (;;) { Is >> Character; - if (Character == '"' || Is.eof()) + if (Character == '"' || Is.eof() || Is.fail()) { break; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |