summaryrefslogtreecommitdiffstats
path: root/courgette/win32_x86_generator.h
diff options
context:
space:
mode:
Diffstat (limited to 'courgette/win32_x86_generator.h')
-rw-r--r--courgette/win32_x86_generator.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/courgette/win32_x86_generator.h b/courgette/win32_x86_generator.h
index 8edb143..496a2ce 100644
--- a/courgette/win32_x86_generator.h
+++ b/courgette/win32_x86_generator.h
@@ -27,8 +27,11 @@ class CourgetteWin32X86PatchGenerator : public TransformationPatchGenerator {
}
Status WriteInitialParameters(SinkStream* parameter_stream) {
- parameter_stream->WriteSizeVarint32(old_element_->offset_in_ensemble());
- parameter_stream->WriteSizeVarint32(old_element_->region().length());
+ if (!parameter_stream->WriteSizeVarint32(
+ old_element_->offset_in_ensemble()) ||
+ !parameter_stream->WriteSizeVarint32(old_element_->region().length())) {
+ return C_STREAM_ERROR;
+ }
return C_OK;
// TODO(sra): Initialize |patcher_| with these parameters.
}