diff options
Diffstat (limited to 'apps/settings.c')
-rw-r--r-- | apps/settings.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/settings.c b/apps/settings.c index 1da552816f..1ef096a1f6 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -1219,16 +1219,20 @@ bool set_int_ex(const unsigned char* string, | |||
1219 | #if CONFIG_KEYPAD != PLAYER_PAD | 1219 | #if CONFIG_KEYPAD != PLAYER_PAD |
1220 | struct value_setting_data data = { | 1220 | struct value_setting_data data = { |
1221 | INT,max, step, voice_unit,unit,formatter,get_talk_id,NULL }; | 1221 | INT,max, step, voice_unit,unit,formatter,get_talk_id,NULL }; |
1222 | if (unit == NULL) | 1222 | if (voice_unit < UNIT_LAST) |
1223 | data.unit = unit_strings[voice_unit]; | 1223 | data.unit = unit_strings[voice_unit]; |
1224 | else | ||
1225 | data.unit = str(voice_unit); | ||
1224 | return do_set_setting(string,variable,(max-min)/step + 1, | 1226 | return do_set_setting(string,variable,(max-min)/step + 1, |
1225 | (max-*variable)/step, &data,function); | 1227 | (max-*variable)/step, &data,function); |
1226 | #else | 1228 | #else |
1227 | int count = (max-min)/step + 1; | 1229 | int count = (max-min)/step + 1; |
1228 | struct value_setting_data data = { | 1230 | struct value_setting_data data = { |
1229 | INT,min, -step, voice_unit,unit,formatter,get_talk_id,NULL }; | 1231 | INT,min, -step, voice_unit,unit,formatter,get_talk_id,NULL }; |
1230 | if (unit == NULL) | 1232 | if (voice_unit < UNIT_LAST) |
1231 | data.unit = unit_strings[voice_unit]; | 1233 | data.unit = unit_strings[voice_unit]; |
1234 | else | ||
1235 | data.unit = str(voice_unit); | ||
1232 | return do_set_setting(string,variable,count, | 1236 | return do_set_setting(string,variable,count, |
1233 | count - ((max-*variable)/step), &data,function); | 1237 | count - ((max-*variable)/step), &data,function); |
1234 | #endif | 1238 | #endif |