From 095c8620111e804cfde59d1141856ccde7aec6d6 Mon Sep 17 00:00:00 2001 From: danfe Date: Fri, 26 Apr 2019 17:55:35 +0000 Subject: Return proper write() status from RAWCodec::writeImage() function. This is not enough to disentangle the port from C++98, but a good change regardless. --- graphics/exact-image/files/patch-codecs_raw.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 graphics/exact-image/files/patch-codecs_raw.cc diff --git a/graphics/exact-image/files/patch-codecs_raw.cc b/graphics/exact-image/files/patch-codecs_raw.cc new file mode 100644 index 000000000000..263408f097db --- /dev/null +++ b/graphics/exact-image/files/patch-codecs_raw.cc @@ -0,0 +1,14 @@ +--- codecs/raw.cc.orig 2011-01-14 16:30:13 UTC ++++ codecs/raw.cc +@@ -71,9 +71,8 @@ bool RAWCodec::writeImage (std::ostream* stream, Image + if (!image.getRawData()) + return false; + +- return stream->write ((char*)image.getRawData(), image.stride()*image.h) +- /* == +- (size_t) image.stride()*image.h*/; ++ stream->write ((char*)image.getRawData(), image.stride()*image.h); ++ return stream->good(); + } + + RAWCodec raw_loader; -- cgit