diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/segment.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h index 8eca6713b3..ddb34582ab 100644 --- a/engines/sci/engine/segment.h +++ b/engines/sci/engine/segment.h @@ -505,10 +505,14 @@ public: } /** - * Returns the size of the array, in bytes. + * Returns the maximum number of bytes that can be stored in the array. */ uint16 byteSize() const { - return _size * _elementSize; + uint16 size = _size; + if (_type == kArrayTypeID || _type == kArrayTypeInt16) { + size *= sizeof(uint16); + } + return size; } /** @@ -892,7 +896,7 @@ public: break; } - return Common::String::format("type %s; %u entries; %u bytes", type, size(), byteSize()); + return Common::String::format("type %s; %u entries", type, size()); } protected: |