Possible fix for coverity #29375
[supertux.git] / src / lisp / writer.cpp
index 63c5aa7..66728fb 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "lisp/writer.hpp"
 
-#include "physfs/ofile_stream.hpp"
+#include "physfs/buffered_ofile_stream.hpp"
 #include "util/log.hpp"
 
 namespace lisp {
@@ -27,7 +27,8 @@ Writer::Writer(const std::string& filename) :
   indent_depth(),
   lists()
 {
-  out = new OFileStream(filename);
+  BufferedOFileStream* filestream = new BufferedOFileStream(filename);
+  out = filestream->get_stream();
   out_owned = true;
   indent_depth = 0;
   out->precision(10);