[Cmake-commits] [cmake-commits] david.cole committed SystemTools.cxx 1.253 1.254

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Oct 16 11:43:09 EDT 2009


Update of /cvsroot/CMake/CMake/Source/kwsys
In directory public:/mounts/ram/cvs-serv7816/Source/kwsys

Modified Files:
	SystemTools.cxx 
Log Message:
Fix crash on Windows. If input stream is no good, do not try to read a line from it. Return false and an empty line instead...


Index: SystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/SystemTools.cxx,v
retrieving revision 1.253
retrieving revision 1.254
diff -C 2 -d -r1.253 -r1.254
*** SystemTools.cxx	28 Sep 2009 15:37:23 -0000	1.253
--- SystemTools.cxx	16 Oct 2009 15:43:05 -0000	1.254
***************
*** 3960,3967 ****
  
    long leftToRead = sizeLimit;
!   
    // If no characters are read from the stream, the end of file has
    // been reached.  Clear the fail bit just before reading.
!   while(!haveNewline &&
          leftToRead != 0 &&
          (is.clear(is.rdstate() & ~kwsys_ios::ios::failbit),
--- 3960,3968 ----
  
    long leftToRead = sizeLimit;
! 
    // If no characters are read from the stream, the end of file has
    // been reached.  Clear the fail bit just before reading.
!   while(is &&
!         !haveNewline &&
          leftToRead != 0 &&
          (is.clear(is.rdstate() & ~kwsys_ios::ios::failbit),



More information about the Cmake-commits mailing list