From eae52af55985b96beadb68f09101350f98f1f694 Mon Sep 17 00:00:00 2001 From: David Eriksson Date: Thu, 13 Nov 2003 12:17:53 +0000 Subject: Fix crashing demos: the demos have no song parameter in cutaway animations. svn-id: r11283 --- queen/cutaway.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/queen/cutaway.cpp b/queen/cutaway.cpp index 0530616aac..9e1f820535 100644 --- a/queen/cutaway.cpp +++ b/queen/cutaway.cpp @@ -893,12 +893,13 @@ byte *Cutaway::getCutawayAnim(byte *ptr, int header, CutawayAnim &anim) { anim.scale = (int16)READ_BE_UINT16(ptr); ptr += 2; -#if 1 - anim.song = (int16)READ_BE_UINT16(ptr); - ptr += 2; -#else - anim.song = 0; -#endif + if (_resource->isDemo()) { + anim.song = 0; + } + else { + anim.song = (int16)READ_BE_UINT16(ptr); + ptr += 2; + } // Extract information that depend on the signedness of values if (anim.unpackFrame < 0) { -- cgit v1.2.3