$OpenBSD: patch-src_script_text-io_cc,v 1.1 2018/04/11 17:51:52 jasper Exp $

Index: src/script/text-io.cc
--- src/script/text-io.cc.orig
+++ src/script/text-io.cc
@@ -84,7 +84,7 @@ bool WritePotentials(const string& filename,
   if (!*strm)
     LOG(ERROR) << "WritePotentials: Write failed: "
                << (filename.empty() ? "standard output" : filename);
-  bool ret = *strm;
+  bool ret = !(!*strm);
   if (strm != &std::cout)
     delete strm;
   return ret;
