aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLittleboy2014-06-11 20:28:09 -0400
committerLittleboy2014-06-16 18:46:22 -0400
commitcbb7c71c89392462ee747027994bbce7217f27d3 (patch)
tree3461d7032fb951bd2b3f1eb6faae22a788570de8
parent9e1c0f14a8c1db3b631f4ab82be15ff9339ecd01 (diff)
downloadscummvm-rg350-cbb7c71c89392462ee747027994bbce7217f27d3.tar.gz
scummvm-rg350-cbb7c71c89392462ee747027994bbce7217f27d3.tar.bz2
scummvm-rg350-cbb7c71c89392462ee747027994bbce7217f27d3.zip
LASTEXPRESS: Add asserts in EntityData serialization code. CID 1003265
-rw-r--r--engines/lastexpress/entities/entity.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp
index 07e82d296e..170248de52 100644
--- a/engines/lastexpress/entities/entity.cpp
+++ b/engines/lastexpress/entities/entity.cpp
@@ -51,6 +51,9 @@ EntityData::EntityCallData::~EntityCallData() {
}
void EntityData::EntityCallData::syncString(Common::Serializer &s, Common::String &string, uint length) const {
+ assert(length <= 13);
+ assert(string.size() <= 13);
+
char seqName[13];
memset(&seqName, 0, length);
@@ -972,5 +975,4 @@ bool Entity::timeCheckPlaySoundUpdatePosition(TimeValue timeValue, uint &paramet
return false;
}
-
} // End of namespace LastExpress