[Scummvm-cvs-logs] SF.net SVN: scummvm:[50591] scummvm/trunk/engines/sci/engine/seg_manager. cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Fri Jul 2 10:53:52 CEST 2010
Revision: 50591
http://scummvm.svn.sourceforge.net/scummvm/?rev=50591&view=rev
Author: thebluegr
Date: 2010-07-02 08:53:51 +0000 (Fri, 02 Jul 2010)
Log Message:
-----------
getString() on a NULL pointer is an empty string (verified in SCI2.1)
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/seg_manager.cpp
Modified: scummvm/trunk/engines/sci/engine/seg_manager.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.cpp 2010-07-02 07:51:44 UTC (rev 50590)
+++ scummvm/trunk/engines/sci/engine/seg_manager.cpp 2010-07-02 08:53:51 UTC (rev 50591)
@@ -789,6 +789,9 @@
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));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list