diff --git a/src/kits/interface/PicturePlayer.cpp b/src/kits/interface/PicturePlayer.cpp index 934e407640..4ded1b4ea9 100644 --- a/src/kits/interface/PicturePlayer.cpp +++ b/src/kits/interface/PicturePlayer.cpp @@ -537,7 +537,8 @@ PicturePlayer::Play(void **callBackTable, int32 tableEntries, void *userData) // If we didn't read enough bytes, skip them. This is not a error // since the instructions can change over time. - if (/*op != B_PIC_ENTER_STATE_CHANGE && op != B_PIC_ENTER_FONT_STATE && */fData.Position() - pos < size) + // Don't do that for state change ops, they don't have a fixed size + if (op != B_PIC_ENTER_STATE_CHANGE && op != B_PIC_ENTER_FONT_STATE && fData.Position() - pos < size) fData.Seek(size - (fData.Position() - pos), SEEK_CUR); // TODO: what if too much was read, should we return B_ERROR?