[ scummvm-Patches-613933 ] Return code for validateResource
noreply at sourceforge.net
noreply at sourceforge.net
Tue Sep 24 19:10:34 CEST 2002
Patches item #613933, was opened at 2002-09-24 12:10
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=613933&group_id=37116
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jamieson Christian (jamieson630)
Assigned to: Nobody/Anonymous (nobody)
Summary: Return code for validateResource
Initial Comment:
This patch establishes a boolean return code for
validateResource, and changes all references to
validateResource to make use of the return code.
A return value of "true" indicates that the resource is
valid; a return value of "false" indicates that it is invalid.
getResourceAddress, in particular, must check this
value and not proceed if the resource is invalid.
Otherwise, it ends up trying to load the resource
anyway, which seems to create some allocation
problems.
This patch is in response to an instability observed in
Full Throttle. Upon entry to the fuel tower, a bad call to
palManipulateInit is being made with an invalid string
resource ID. Attempts to obtain the string resources
resulted in bad allocations/loads/whatever from
getResourceAddress, and caused the program to crash
thereafter when trying to save the game (and possibly in
other situations as well).
Thanks to eriktorbjorn for pointing out this problem.
This patches the following files:
resource.cpp - Revision 1.11
scumm.h - Revision 1.28
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=613933&group_id=37116
More information about the Scummvm-tracker
mailing list