[Scummvm-git-logs] scummvm master -> 562180132abcaea1c974753ad8819f372b4257c8
dreammaster
noreply at scummvm.org
Mon Jan 13 20:21:42 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
562180132a GOT: Fix crash in NPC dialog display
Commit: 562180132abcaea1c974753ad8819f372b4257c8
https://github.com/scummvm/scummvm/commit/562180132abcaea1c974753ad8819f372b4257c8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-01-13T12:21:30-08:00
Commit Message:
GOT: Fix crash in NPC dialog display
Changed paths:
engines/got/gfx/gfx_pics.cpp
engines/got/gfx/gfx_pics.h
diff --git a/engines/got/gfx/gfx_pics.cpp b/engines/got/gfx/gfx_pics.cpp
index 7b65dd610f2..3bb9908a149 100644
--- a/engines/got/gfx/gfx_pics.cpp
+++ b/engines/got/gfx/gfx_pics.cpp
@@ -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) {
diff --git a/engines/got/gfx/gfx_pics.h b/engines/got/gfx/gfx_pics.h
index 1c3bb481b70..c1b73b9eabe 100644
--- a/engines/got/gfx/gfx_pics.h
+++ b/engines/got/gfx/gfx_pics.h
@@ -60,6 +60,8 @@ public:
size_t size() const {
return _size;
}
+
+ GfxPics &operator=(const GfxPics &src);
};
class BgPics : public GfxPics {
More information about the Scummvm-git-logs
mailing list