Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

zip_io write returns failure

SynthBioTech39b142376583
diff --git a/core/io/zip_io.cpp b/core/io/zip_io.cpp
index 4de4710da79..4ecda88e35f 100644
--- a/core/io/zip_io.cpp
+++ b/core/io/zip_io.cpp
@@ -110,8 +110,13 @@ uLong zipio_write(voidpf opaque, voidpf stream, const void *buf, uLong size) {
ERR_FAIL_NULL_V(fa, 0);
ERR_FAIL_COND_V(fa->is_null(), 0);
- (*fa)->store_buffer((uint8_t *)buf, size);
- return size;
+ bool fa_success = (*fa)->store_buffer((uint8_t *)buf, size);
+
+ if (fa_success) {
+ return size;
+ }
+
+ return 0;
}
long zipio_tell(voidpf opaque, voidpf stream) {