Opened 15 months ago
Closed 15 months ago
#14617 closed defect (fixed)
ACCESS: Failed assertion in copyRectToSurface() when dragging inventory item (Amazon: GoE)
Reported by: | PushmePullyu | Owned by: | PushmePullyu |
---|---|---|---|
Priority: | normal | Component: | Engine: Access |
Version: | Keywords: | ||
Cc: | PushmePullyu | Game: | Amazon: Guardians of Eden |
Description
Tested with 645230091f29ddcb73474cd820581e5f739afa15 on Linux x86_64 using the US DOS CD version of Amazon: Guardians of Eden.
When dragging an item to the right or bottom edge of the screen in inventory view the game terminates. Message for the right edge case:
scummvm: graphics/surface.cpp:172: void Graphics::Surface::copyRectToSurface(const void*, int, int, int, int, int): Assertion `width > 0 && destX + width <= w' failed.
The reason for the crash is this code in engines/access/inventory.cpp:
in combineItems():
Common::Rect lastRect(lastBox.x, lastBox.y, lastBox.x + 46, lastBox.y + 35); screen.copyBlock(&_vm->_buffer2, lastRect);
Due to the addition, lastRect can be out of bounds of the screen surface.
To reproduce:
- Start a new game
- Click on the backpack icon to open the inventory
- Drag the car keys to the right or bottom edge of the screen
Change History (2)
comment:1 by , 15 months ago
Owner: | set to |
---|---|
Resolution: | → pending |
Status: | new → pending |
comment:2 by , 15 months ago
Resolution: | pending → fixed |
---|---|
Status: | pending → closed |
Thanks for your work on this. The PR has been merged
Note:
See TracTickets
for help on using tickets.
PR with potential fix: https://github.com/scummvm/scummvm/pull/5324