Jelajahi Sumber

BUG: Handle buggy streams

Andy Cedilnik 20 tahun lalu
induk
melakukan
0321dae07b
1 mengubah file dengan 4 tambahan dan 0 penghapusan
  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;