Page 1 of 1

CyclePalette crashes if started from pen 0

Posted: Wed May 28, 2025 3:12 pm
by jPV
CyclePalette() crashes the whole system on MorphOS (have to do a powerbutton shutdown) if it's started from the pen 0. Haven't tested on other platforms.

Code: Select all

CreatePalette(1, #PALETTE_GRAY8)

; Works
CyclePalette(1, 1, 7)

pal = GetAttribute(#PALETTE, 1, #ATTRPALETTE)
DebugPrint(Unpack(pal))

; Crashes if the start pen is the first one (0)
CyclePalette(1, 0, 7)

pal = GetAttribute(#PALETTE, 1, #ATTRPALETTE)
DebugPrint(Unpack(pal))

Re: CyclePalette crashes if started from pen 0

Posted: Thu Jun 05, 2025 7:29 pm
by airsoftsoftwair

Code: Select all

- Fix: Memory access fault in CyclePalette()