summaryrefslogtreecommitdiff
path: root/drivers/windows/file_access_windows.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/windows/file_access_windows.cpp')
-rw-r--r--drivers/windows/file_access_windows.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp
index 0f52c70482..d6deda7b5d 100644
--- a/drivers/windows/file_access_windows.cpp
+++ b/drivers/windows/file_access_windows.cpp
@@ -219,7 +219,7 @@ uint64_t FileAccessWindows::get_position() const {
return aux_position;
}
-uint64_t FileAccessWindows::get_len() const {
+uint64_t FileAccessWindows::get_length() const {
ERR_FAIL_COND_V(!f, 0);
uint64_t pos = get_position();
@@ -294,6 +294,7 @@ void FileAccessWindows::store_8(uint8_t p_dest) {
void FileAccessWindows::store_buffer(const uint8_t *p_src, uint64_t p_length) {
ERR_FAIL_COND(!f);
+ ERR_FAIL_COND(!p_src && p_length > 0);
if (flags == READ_WRITE || flags == WRITE_READ) {
if (prev_op == READ) {
if (last_error != ERR_FILE_EOF) {