mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-08 19:00:57 +00:00
getString() on a NULL pointer is an empty string (verified in SCI2.1)
svn-id: r50591
This commit is contained in:
parent
8b0f49b801
commit
b252d5f0b9
@ -789,6 +789,9 @@ size_t SegManager::strlen(reg_t str) {
|
||||
|
||||
Common::String SegManager::getString(reg_t pointer, int entries) {
|
||||
Common::String ret;
|
||||
if (pointer.isNull())
|
||||
return ret; // empty text
|
||||
|
||||
SegmentRef src_r = dereference(pointer);
|
||||
if (!src_r.isValid()) {
|
||||
warning("SegManager::getString(): Attempt to dereference invalid pointer %04x:%04x", PRINT_REG(pointer));
|
||||
|
Loading…
Reference in New Issue
Block a user