[Scummvm-git-logs] scummvm master -> f79f06de22dc8956d1a570afc446f1aba65a8d5b
athrxx
noreply at scummvm.org
Wed Apr 23 17:14:44 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
f79f06de22 SCUMM: fix UBSan warning
Commit: f79f06de22dc8956d1a570afc446f1aba65a8d5b
https://github.com/scummvm/scummvm/commit/f79f06de22dc8956d1a570afc446f1aba65a8d5b
Author: athrxx (athrxx at scummvm.org)
Date: 2025-04-23T19:14:03+02:00
Commit Message:
SCUMM: fix UBSan warning
(adding an offset to a nullptr)
Changed paths:
engines/scumm/gfx.h
diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h
index ce0c62eda0c..c4ba35cec01 100644
--- a/engines/scumm/gfx.h
+++ b/engines/scumm/gfx.h
@@ -271,7 +271,7 @@ struct VirtScreen : Graphics::Surface {
}
byte *getBackPixels(int x, int y) const {
- return (byte *)backBuf + y * pitch + (xstart + x) * format.bytesPerPixel;
+ return (backBuf != nullptr) ? (byte *)backBuf + y * pitch + (xstart + x) * format.bytesPerPixel : nullptr;
}
};
More information about the Scummvm-git-logs
mailing list