aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25
diff options
context:
space:
mode:
authorThierry Crozat2013-10-05 00:19:31 +0100
committerThierry Crozat2013-10-05 00:25:04 +0100
commitf55259e3b103d5aa966b00fb5c574d84a4f399c0 (patch)
tree346177693669890aa131bf8bd2e2da6e63006dbc /engines/sword25
parent0e2cf28d99a79a9ae84a4d48cf0e607deacb6653 (diff)
downloadscummvm-rg350-f55259e3b103d5aa966b00fb5c574d84a4f399c0.tar.gz
scummvm-rg350-f55259e3b103d5aa966b00fb5c574d84a4f399c0.tar.bz2
scummvm-rg350-f55259e3b103d5aa966b00fb5c574d84a4f399c0.zip
SWORD25: Fix regression in persistence code
The regression was introduced by commit e6ba26ff0d which wrote coordinates of a rect as unsigned int when they were before written as signed int. Since the load code was not modified it still expected signed int. They are now again written as signed int. Any gamed saved between commit e6ba26ff0d and this commit will therefore be corrupted.
Diffstat (limited to 'engines/sword25')
-rw-r--r--engines/sword25/math/region.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/sword25/math/region.cpp b/engines/sword25/math/region.cpp
index b6ebaee23f..db888e432a 100644
--- a/engines/sword25/math/region.cpp
+++ b/engines/sword25/math/region.cpp
@@ -311,10 +311,10 @@ bool Region::persist(OutputPersistenceBlock &writer) {
++It;
}
- writer.write((uint32)_boundingBox.left);
- writer.write((uint32)_boundingBox.top);
- writer.write((uint32)_boundingBox.right);
- writer.write((uint32)_boundingBox.bottom);
+ writer.write((int32)_boundingBox.left);
+ writer.write((int32)_boundingBox.top);
+ writer.write((int32)_boundingBox.right);
+ writer.write((int32)_boundingBox.bottom);
return Result;
}