AudioStreamWAV: Check for eof_reached when reading LIST INFO tags
This commit is contained in:
@@ -881,6 +881,7 @@ Ref<AudioStreamWAV> AudioStreamWAV::load_from_buffer(const Vector<uint8_t> &p_st
|
||||
// 'INFO' list type.
|
||||
// The size of an entry can be arbitrary.
|
||||
while (file->get_position() < end_of_chunk) {
|
||||
ERR_BREAK_MSG(file->eof_reached(), "EOF reached while reading INFO chunk.");
|
||||
char info_id[4];
|
||||
file->get_buffer((uint8_t *)&info_id, 4);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user