aboutsummaryrefslogtreecommitdiff
path: root/scumm/smush/imuse_channel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scumm/smush/imuse_channel.cpp')
-rw-r--r--scumm/smush/imuse_channel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scumm/smush/imuse_channel.cpp b/scumm/smush/imuse_channel.cpp
index 43d17a60f4..94aab12519 100644
--- a/scumm/smush/imuse_channel.cpp
+++ b/scumm/smush/imuse_channel.cpp
@@ -193,10 +193,10 @@ void ImuseChannel::decode() {
}
bool ImuseChannel::handleSubTags(int & offset) {
- int available_size = _tbufferSize - offset;
- if(available_size >= 8) {
+ if(_tbufferSize - offset >= 8) {
Chunk::type type = READ_BE_UINT32(_tbuffer + offset);
unsigned int size = READ_BE_UINT32(_tbuffer + offset + 4);
+ unsigned int available_size = _tbufferSize - offset;
switch(type) {
case TYPE_MAP_:
_inData = false;