Commit 4601ad76 authored by Stefano Sabatini's avatar Stefano Sabatini

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.
parent eef4b704
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment