MediaPlayer: Fix -Werror=format-truncation=
Increase size of text[], since snprintf() write to it max 66 bytes.
(sizeof(positionText)-1 + sizeof(" / ") + sizeof(durationText)-1 + 1 = 66)
Pointed out by gcc8.
Change-Id: Ic6ce221edb4ceff4b63c7b30d26c52d613cbb35e
Reviewed-on: https://review.haiku-os.org/779
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
947124d152
commit
296120e005
@@ -57,7 +57,7 @@ public:
|
||||
char durationText[32];
|
||||
duration_to_string(fDuration, durationText, sizeof(durationText));
|
||||
|
||||
char text[64];
|
||||
char text[66];
|
||||
snprintf(text, sizeof(text), "%s / %s", positionText, durationText);
|
||||
SetText(text);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user