Skip to content

Commit 22aadbc

Browse files
committed
Update Volume String Allocation
[Problem] Volume string allocates 8 characters but I only need 5. [Solution] Only allocate 5 characters for the volume string. [Testing] Tested and confirmed working on device.
1 parent 811047a commit 22aadbc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scenes/settings_scene.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void scene_on_enter_settings_scene(void* context) {
9292
variable_item_set_current_value_index(
9393
item, (uint8_t)(((struct ToneData_t*)app->additionalData)->volume * 10.0f));
9494

95-
volumeStr = calloc(8, sizeof(char));
95+
volumeStr = calloc(5, sizeof(char));
9696
snprintf(
9797
volumeStr,
9898
5,

0 commit comments

Comments
 (0)