mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-12 14:09:28 +00:00
DIRECTOR: fix FPE in initTransParams
This commit is contained in:
parent
677cec6aea
commit
be5134d7ca
@ -1064,19 +1064,19 @@ void Window::initTransParams(TransParams &t, Common::Rect &clipRect) {
|
||||
|
||||
switch (transProps[t.type].dir) {
|
||||
case kTransDirHorizontal:
|
||||
t.steps = w / t.chunkSize;
|
||||
t.steps = MAX(w / t.chunkSize, (uint)1);
|
||||
t.xStepSize = w / t.steps;
|
||||
t.xpos = w % t.steps;
|
||||
break;
|
||||
|
||||
case kTransDirVertical:
|
||||
t.steps = h / t.chunkSize;
|
||||
t.steps = MAX(h / t.chunkSize, (uint)1);
|
||||
t.yStepSize = h / t.steps;
|
||||
t.ypos = h % t.steps;
|
||||
break;
|
||||
|
||||
case kTransDirBoth:
|
||||
t.steps = m / t.chunkSize;
|
||||
t.steps = MAX(m / t.chunkSize, (uint)1);
|
||||
|
||||
t.xStepSize = w / t.steps;
|
||||
t.xpos = w % t.steps;
|
||||
|
Loading…
x
Reference in New Issue
Block a user