Don’t ignore write failure

Makes it easy to find the source of the problems than failing later.
This commit is contained in:
Khaled Hosny
2016-08-09 15:56:03 +02:00
parent afbecce5ff
commit cdd850ef52
+4 -1
View File
@@ -923,7 +923,10 @@ bool ReconstructFont(uint8_t* transformed_buf,
table.dst_offset = dest_offset;
checksum = ComputeULongSum(transformed_buf + table.src_offset,
table.src_length);
out->Write(transformed_buf + table.src_offset, table.src_length);
if (PREDICT_FALSE(!out->Write(transformed_buf + table.src_offset,
table.src_length))) {
return FONT_COMPRESSION_FAILURE();
}
} else {
if (table.tag == kGlyfTableTag) {
table.dst_offset = dest_offset;