summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-06-19 23:43:46 +0200
committerGitHub <noreply@github.com>2020-06-19 23:43:46 +0200
commit73cbe3d9dae6690b806b6d892cf4fc470abb34e0 (patch)
treec669147aa24b3dfe5b7dd47fc43f7a481cd51d17 /core
parent5e13c3435da48711fcbedc8b1b1917832430e07b (diff)
parent37a2a5a99789d2ec7cfed616ee11d5560143faac (diff)
Merge pull request #39684 from asmaloney/FileAccessBuffered-init
Ensure FileAccessBuffered structs are properly initialized
Diffstat (limited to 'core')
-rw-r--r--core/io/file_access_buffered.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/io/file_access_buffered.h b/core/io/file_access_buffered.h
index 61c0fa7489..99d5ce903d 100644
--- a/core/io/file_access_buffered.h
+++ b/core/io/file_access_buffered.h
@@ -51,16 +51,16 @@ protected:
Error set_error(Error p_error) const;
mutable struct File {
- bool open;
- int size;
- int offset;
+ bool open = false;
+ int size = 0;
+ int offset = 0;
String name;
- int access_flags;
+ int access_flags = 0;
} file;
mutable struct Cache {
Vector<uint8_t> buffer;
- int offset;
+ int offset = 0;
} cache;
virtual int read_data_block(int p_offset, int p_size, uint8_t *p_dest = nullptr) const = 0;