diff options
author | richiesams | 2013-08-26 14:17:43 -0500 |
---|---|---|
committer | richiesams | 2013-08-28 16:44:25 -0500 |
commit | da3f137b6b4c4c1a06b206d47f8818868cc227ff (patch) | |
tree | 6704430e9e2fadf5d3acd5cd4c3a6e1baee74bf4 /engines | |
parent | 610eb118246531e38173d67d6790b4737b1a6744 (diff) | |
download | scummvm-rg350-da3f137b6b4c4c1a06b206d47f8818868cc227ff.tar.gz scummvm-rg350-da3f137b6b4c4c1a06b206d47f8818868cc227ff.tar.bz2 scummvm-rg350-da3f137b6b4c4c1a06b206d47f8818868cc227ff.zip |
ZVISION: sscanf to ints before storing them in Rect coords
Diffstat (limited to 'engines')
-rw-r--r-- | engines/zvision/lever_control.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/zvision/lever_control.cpp b/engines/zvision/lever_control.cpp index 847defd942..6555fe5ce1 100644 --- a/engines/zvision/lever_control.cpp +++ b/engines/zvision/lever_control.cpp @@ -108,7 +108,13 @@ void LeverControl::parseLevFile(const Common::String &fileName) { } else if (line.matchString("*skipcolor*", true)) { // Not used } else if (line.matchString("*anim_coords*", true)) { - sscanf(line.c_str(), "%*[^:]:%u %u %u %u~", &_animationCoords.left, &_animationCoords.top, &_animationCoords.right, &_animationCoords.bottom); + int left, top, right, bottom; + sscanf(line.c_str(), "%*[^:]:%d %d %d %d~", &left, &top, &right, &bottom); + + _animationCoords.left = left; + _animationCoords.top = top; + _animationCoords.right = right; + _animationCoords.bottom = bottom; } else if (line.matchString("*mirrored*", true)) { uint mirrored; sscanf(line.c_str(), "%*[^:]:%u~", &mirrored); |