Commit 431bcb1a authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Fix for bad error pointer deleting non existent sprite

Doing *WimpKillSprite _not_there_  had the following behaviour

Priority   | Sprite exists  Sprite doesn't  Sprite is ROM
Lo then Hi | Deletes        Bad error ptr   Silence
Hi then Lo | Deletes        Silence         Silence

The bad error pointer was caused by an early return if the high priority pool is the ROM sprites (because the earlier failure to find it in the low priority pools set V, and the early return used TEQ, so the error pointer in R0 was the SpriteOp reason code).
Proceed to try to look up the sprite, even if there's no hope of deleting it, in order to get a valid error message.

Version 5.61. Tagged as 'Wimp-5_61'
parent 2fb1a8bf
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.60"
Module_Version SETA 560
Module_MajorVersion SETS "5.61"
Module_Version SETA 561
Module_MinorVersion SETS ""
Module_Date SETS "17 Feb 2018"
Module_ApplicationDate SETS "17-Feb-18"
Module_Date SETS "18 Mar 2018"
Module_ApplicationDate SETS "18-Mar-18"
Module_ComponentName SETS "Wimp"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Wimp"
Module_FullVersion SETS "5.60"
Module_HelpVersion SETS "5.60 (17 Feb 2018)"
Module_FullVersion SETS "5.61"
Module_HelpVersion SETS "5.61 (18 Mar 2018)"
/* (5.60)
/* (5.61)
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
#define Module_MajorVersion_CMHG 5.60
#define Module_MajorVersion_CMHG 5.61
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 17 Feb 2018
#define Module_Date_CMHG 18 Mar 2018
#define Module_MajorVersion "5.60"
#define Module_Version 560
#define Module_MajorVersion "5.61"
#define Module_Version 561
#define Module_MinorVersion ""
#define Module_Date "17 Feb 2018"
#define Module_Date "18 Mar 2018"
#define Module_ApplicationDate "17-Feb-18"
#define Module_ApplicationDate "18-Mar-18"
#define Module_ComponentName "Wimp"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Wimp"
#define Module_FullVersion "5.60"
#define Module_HelpVersion "5.60 (17 Feb 2018)"
#define Module_LibraryVersionInfo "5:60"
#define Module_FullVersion "5.61"
#define Module_HelpVersion "5.61 (18 Mar 2018)"
#define Module_LibraryVersionInfo "5:61"
......@@ -4097,7 +4097,8 @@ do_spriteop
TEQ R14, #SpriteReason_DeleteSprite ; is able to get here, provided it came via *WimpKillSprite
LDREQ R14, baseofromsprites
Pull "PC", EQ ; don't attempt to delete ROM sprites!
ASSERT (SpriteReason_SelectSprite :OR: 1) = SpriteReason_DeleteSprite
BICEQ R0, R0, #1 ; don't attempt to delete ROM sprites, but do get an error if it's not there
LDR R14,lengthflags
CMP R14,#0 ; if length 0, then R2 --> sprite
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment