From df40c144a90059845812fff088f0b274b18e3fca Mon Sep 17 00:00:00 2001 From: Hardeep Sidhu Date: Wed, 11 Jun 2003 15:36:04 +0000 Subject: [PATCH] From Bjorn: 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. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3745 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/settings.c b/apps/settings.c index 38b9662b48..b8062be68a 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -1679,7 +1679,7 @@ bool set_option(char* string, void* variable, enum optiontype type, case BUTTON_MENU: #endif if (((type==INT) && (*intvar != oldval)) || - ((type==BOOL) && ((int)*boolvar != oldval))) { + ((type==BOOL) && (*boolvar != (bool)oldval))) { if (type==INT) *intvar=oldval; else