summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-09-07 07:53:56 -0300
committerGitHub <noreply@github.com>2017-09-07 07:53:56 -0300
commitb19b7aebf7673b8d2083f311bd7190680cd39e1e (patch)
treeac8e229112c1da8751d7ee16fddbac6143ce7c84
parent5f0d367fef25b30742ba71f12e339137e02c59ab (diff)
parentcbedb544086e77abc367b900a244e4f29baa74dd (diff)
Merge pull request #11027 from hpvb/fix-11022
Fix EOF in wav file importer
-rw-r--r--drivers/unix/file_access_unix.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp
index db06cce644..80565c5b02 100644
--- a/drivers/unix/file_access_unix.cpp
+++ b/drivers/unix/file_access_unix.cpp
@@ -164,7 +164,6 @@ void FileAccessUnix::seek_end(int64_t p_position) {
ERR_FAIL_COND(!f);
- last_error = OK;
if (fseek(f, p_position, SEEK_END))
check_errors();
}
@@ -173,7 +172,6 @@ size_t FileAccessUnix::get_pos() const {
ERR_FAIL_COND_V(!f, 0);
- last_error = OK;
int pos = ftell(f);
if (pos < 0) {
check_errors();
@@ -207,8 +205,8 @@ uint8_t FileAccessUnix::get_8() const {
uint8_t b;
if (fread(&b, 1, 1, f) == 0) {
check_errors();
- };
-
+ b = '\0';
+ }
return b;
}