diff options
author | Eugene Sandulenko | 2014-06-06 15:19:19 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2014-06-06 15:19:19 +0300 |
commit | 5c018d62281e8f56c1455ca778fdbda66ff7c64d (patch) | |
tree | 85e866aa139e00d20c1720609cda506029caface /engines | |
parent | 631d4cdc0adabdc4a1cfb90f3a1b18eca841927c (diff) | |
download | scummvm-rg350-5c018d62281e8f56c1455ca778fdbda66ff7c64d.tar.gz scummvm-rg350-5c018d62281e8f56c1455ca778fdbda66ff7c64d.tar.bz2 scummvm-rg350-5c018d62281e8f56c1455ca778fdbda66ff7c64d.zip |
FULLPIPE: Add additional sanity check. CID 1220154
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/scenes.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 4caa9a42a5..13c653ad09 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -1455,6 +1455,9 @@ void BallChain::init(Ball **ball) { Ball *BallChain::sub04(Ball *ballP, Ball *ballN) { if (!pTail) { + if (!cPlexLen) + error("BallChain::sub04: cPlexLen is 0"); + cPlex = (byte *)calloc(cPlexLen, sizeof(Ball)); Ball *runPtr = (Ball *)&cPlex[(cPlexLen - 1) * sizeof(Ball)]; |