Skip to content

Commit

Permalink
DIRECTOR: Added sanity check for broken score files
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Mar 22, 2017
1 parent 4591dd9 commit a025300
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engines/director/score.cpp
Expand Up @@ -317,7 +317,7 @@ void Score::loadFrames(Common::SeekableSubReadStreamEndian &stream) {
byte channelData[kChannelDataSize];
memset(channelData, 0, kChannelDataSize);

while (size != 0) {
while (size != 0 && !stream.eos()) {
uint16 frameSize = stream.readUint16();
debugC(kDebugLoading, 8, "++++ score frame %d (frameSize %d) size %d", _frames.size(), frameSize, size);
size -= frameSize;
Expand Down

0 comments on commit a025300

Please sign in to comment.