From 40f591a02646d7fea1bd25e2e8c540b69cb04d2e Mon Sep 17 00:00:00 2001 From: Nicolas Pennequin Date: Fri, 5 Sep 2008 22:53:03 +0000 Subject: [PATCH] Merge r18419 and r18421 from trunk: Fix the bug reported in FS#9350: the WPS would crash on %mm or %cf if they weren't in conditionals, and make %mm 0-based again (as described in CustomWPS) and change %cf accordingly. git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18427 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/gwps-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index dba703c1aa..4c790b3948 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c @@ -1138,12 +1138,12 @@ static char *get_token_value(struct gui_wps *gwps, case WPS_TOKEN_REPEAT_MODE: if (intval) *intval = global_settings.repeat_mode + 1; - snprintf(buf, buf_size, "%d", *intval); + snprintf(buf, buf_size, "%d", global_settings.repeat_mode); return buf; case WPS_TOKEN_RTC_12HOUR_CFG: if (intval) *intval = global_settings.timeformat + 1; - snprintf(buf, buf_size, "%d", *intval); + snprintf(buf, buf_size, "%d", global_settings.timeformat); return buf; #if CONFIG_RTC case WPS_TOKEN_RTC_DAY_OF_MONTH: