Skip to content

Commit

Permalink
GOT: Fix crash in NPC dialog display
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Jan 13, 2025
1 parent b9dd400 commit 5621801
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions engines/got/gfx/gfx_pics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ void GfxPics::load(const Common::String &name, int blockSize) {
delete[] buff;
}

GfxPics &GfxPics::operator=(const GfxPics &src) {
clear();
resize(src._size);

for (int i = 0; i < _size; ++i)
_array[i].copyFrom(src._array[i]);

return *this;
}


void BgPics::setArea(int area) {
if (area != _area) {
Expand Down
2 changes: 2 additions & 0 deletions engines/got/gfx/gfx_pics.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class GfxPics {
size_t size() const {
return _size;
}

GfxPics &operator=(const GfxPics &src);
};

class BgPics : public GfxPics {
Expand Down

0 comments on commit 5621801

Please sign in to comment.