1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

ffprobe: fix value_string() prefix printing for values with negative logarithm

The index for the binary_unit_prefixes array is expected to be positive,
so avoid to use negative indexes for accessing it.
This commit is contained in:
Stefano Sabatini 2012-01-19 01:34:30 +01:00
parent eef4b70450
commit 4601ad769d

View File

@ -106,7 +106,7 @@ static char *value_string(char *buf, int buf_size, struct unit_value uv)
const char *prefix_string = "";
int l;
if (use_value_prefix) {
if (use_value_prefix && vald > 1) {
long long int index;
if (uv.unit == unit_byte_str && use_byte_value_binary_prefix) {