#8063 closed patch
Return code for validateResource
Reported by: | SF/jamieson630 | Owned by: | SF/ender |
---|---|---|---|
Priority: | normal | Component: | Engine: SCUMM |
Version: | Keywords: | ||
Cc: | Game: | Full Throttle |
Description
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
Ticket imported from: #613933. Ticket imported from: patches/168.
Attachments (1)
Change History (4)
by , 22 years ago
Attachment: | validateResource.diff added |
---|
comment:2 by , 22 years ago
Owner: | set to |
---|---|
Status: | new → closed |
comment:3 by , 6 years ago
Component: | → Engine: SCUMM |
---|---|
Game: | → Full Throttle |
Patch against a September 24 CVS snapshot