Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: cvs: apps settings.c,1.159,1.160
From: Björn Stenberg (bjorn_at_haxx.se)
Date: 2003-06-11


Hardeep Sidhu wrote:
> if (((type==INT) && (*intvar != oldval)) ||
> - ((type==BOOL) && (*boolvar != oldval))) {
> + ((type==BOOL) && ((int)*boolvar != oldval))) {
> if (type==INT)

The bool variable can be located at an odd address. Trying to read an integer from an odd address will result in a CPUAdrErr exception.

It would probably be better to cast oldval to a bool instead.

-- 
Björn



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa