Explorar el Código

BUG: Handle buggy streams

Andy Cedilnik hace 20 años
padre
commit
0321dae07b
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      Source/cmCTest.h

+ 4 - 0
Source/cmCTest.h

@@ -393,6 +393,10 @@ public:
 
 inline std::ostream& operator<< (std::ostream& os, const cmCTestLogWrite& c)
 {
+  if (!c.Length)
+    {
+    return os;
+    }
   os.write(c.Data, c.Length);
   os.flush();
   return os;