mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-27 12:14:10 +08:00
hud: fix values printing
Oops...
Fixes: 595079c37c
("hud: extract float printf modifer selection logic to helper")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20643>
This commit is contained in:
parent
63203f94e8
commit
ab9a9f702a
@ -313,9 +313,9 @@ number_to_human_readable(double num, enum pipe_driver_query_type type,
|
||||
d /= divisor;
|
||||
unit++;
|
||||
}
|
||||
|
||||
sprintf(out, get_float_modifier(d), d);
|
||||
sprintf(out, "%s", units[unit]);
|
||||
int n = sprintf(out, get_float_modifier(d), d);
|
||||
if (n > 0)
|
||||
sprintf(&out[n], "%s", units[unit]);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user