aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs/win32
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqfs/win32')
-rw-r--r--lib/sqfs/win32/io_file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqfs/win32/io_file.c b/lib/sqfs/win32/io_file.c
index cfef296..548a246 100644
--- a/lib/sqfs/win32/io_file.c
+++ b/lib/sqfs/win32/io_file.c
@@ -187,6 +187,8 @@ sqfs_file_t *sqfs_open_file(const char *filename, sqfs_u32 flags)
return NULL;
}
+ sqfs_object_init(file, stdio_destroy, stdio_copy);
+
if (flags & SQFS_FILE_OPEN_READ_ONLY) {
file->readonly = true;
access_flags = GENERIC_READ;
@@ -231,7 +233,5 @@ sqfs_file_t *sqfs_open_file(const char *filename, sqfs_u32 flags)
base->write_at = stdio_write_at;
base->get_size = stdio_get_size;
base->truncate = stdio_truncate;
- ((sqfs_object_t *)base)->destroy = stdio_destroy;
- ((sqfs_object_t *)base)->copy = stdio_copy;
return base;
}