Commit c6697ab1 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Fix for null pointer dereference & data abort on swapping to no toolsprites

Way back in Wimp-4_76 the range check for being in ROM (in the free tool area function) was reworked as the ROM was no longer at the top of the 64M address space. In doing so the sense of the function got inverted and actually the tool area was not freed at all.
The result of this would be that swapping to no toolsprites (for that retro RISC OS 2 look) would data abort when the kernel tried to plot a sprite from address 0 because the check prior to the title bar plot believed a tool area existed.

Version 5.29. Tagged as 'Wimp-5_29'
parent 96a860b5
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
GBLS Module_HelpVersion GBLS Module_HelpVersion
GBLS Module_ComponentName GBLS Module_ComponentName
GBLS Module_ComponentPath GBLS Module_ComponentPath
Module_MajorVersion SETS "5.28" Module_MajorVersion SETS "5.29"
Module_Version SETA 528 Module_Version SETA 529
Module_MinorVersion SETS "" Module_MinorVersion SETS ""
Module_Date SETS "18 May 2013" Module_Date SETS "21 May 2013"
Module_ApplicationDate SETS "18-May-13" Module_ApplicationDate SETS "21-May-13"
Module_ComponentName SETS "Wimp" Module_ComponentName SETS "Wimp"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Wimp" Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Wimp"
Module_FullVersion SETS "5.28" Module_FullVersion SETS "5.29"
Module_HelpVersion SETS "5.28 (18 May 2013)" Module_HelpVersion SETS "5.29 (21 May 2013)"
END END
/* (5.28) /* (5.29)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1. * Last processed by srccommit version: 1.1.
* *
*/ */
#define Module_MajorVersion_CMHG 5.28 #define Module_MajorVersion_CMHG 5.29
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 18 May 2013 #define Module_Date_CMHG 21 May 2013
#define Module_MajorVersion "5.28" #define Module_MajorVersion "5.29"
#define Module_Version 528 #define Module_Version 529
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "18 May 2013" #define Module_Date "21 May 2013"
#define Module_ApplicationDate "18-May-13" #define Module_ApplicationDate "21-May-13"
#define Module_ComponentName "Wimp" #define Module_ComponentName "Wimp"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Wimp" #define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Wimp"
#define Module_FullVersion "5.28" #define Module_FullVersion "5.29"
#define Module_HelpVersion "5.28 (18 May 2013)" #define Module_HelpVersion "5.29 (21 May 2013)"
#define Module_LibraryVersionInfo "5:28" #define Module_LibraryVersionInfo "5:29"
...@@ -1139,7 +1139,7 @@ freetoolarea EntryS "R1-R4" ...@@ -1139,7 +1139,7 @@ freetoolarea EntryS "R1-R4"
; ;
LDR R2,tool_area LDR R2,tool_area
CMP R2,#0 ; is there a tools area already? CMP R2,#0 ; is there a tools area already?
BNE %FT01 BEQ %FT01
LDR R14,ROMstart ; it may have started life in ROM LDR R14,ROMstart ; it may have started life in ROM
LDR R4,ROMend LDR R4,ROMend
...@@ -3164,7 +3164,7 @@ cachetoolspritedata ...@@ -3164,7 +3164,7 @@ cachetoolspritedata
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; Routine called to process a palette entry to "tint" a tool sprite ; Routine called to process a palette entry to "tint" a tool sprite
; Maps greys on to title bar foreground-background scale ; Maps greys on to title bar foreground-background scale
; White - rgb_lightgrey - Black ---> White - [titlecolour] - [truetitlefg] ; White - rgb_lightgrey - Black ---> White - [truetitlecolour] - [truetitlefg]
; ;
; In: R0 = input palette entry ; In: R0 = input palette entry
; Out: R0 = modified palette entry ; Out: R0 = modified palette entry
......
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