aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2019-04-27 01:55:35 +0800
committerdanfe <danfe@FreeBSD.org>2019-04-27 01:55:35 +0800
commit095c8620111e804cfde59d1141856ccde7aec6d6 (patch)
tree9d43cd3d111b8d781802c92c1bcf72cb66e6eaf2
parentccabbfe564ab35d252ea425a55ae2626636a5a42 (diff)
downloadfreebsd-ports-gnome-095c8620111e804cfde59d1141856ccde7aec6d6.tar.gz
freebsd-ports-gnome-095c8620111e804cfde59d1141856ccde7aec6d6.tar.zst
freebsd-ports-gnome-095c8620111e804cfde59d1141856ccde7aec6d6.zip
Return proper write() status from RAWCodec::writeImage() function. This is
not enough to disentangle the port from C++98, but a good change regardless.
-rw-r--r--graphics/exact-image/files/patch-codecs_raw.cc14
1 files changed, 14 insertions, 0 deletions
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;