diff options
-rw-r--r-- | engines/cge2/spare.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/engines/cge2/spare.cpp b/engines/cge2/spare.cpp index 53f99e4e67..76bdbfa7ef 100644 --- a/engines/cge2/spare.cpp +++ b/engines/cge2/spare.cpp @@ -30,8 +30,8 @@ namespace CGE2 { void Spare::sync(Common::Serializer &s) { + int size = 0; if (s.isSaving()) { - int size = 0; for (uint i = 0; i < _container.size(); i++) if (_container[i]->_ref >= 141) size++; @@ -42,7 +42,6 @@ void Spare::sync(Common::Serializer &s) { _container[i]->sync(s); } } else { - int size; s.syncAsSint16LE(size); for (int i = 0; i < size; i++) { |