Commit 906c4f63 authored by Augusto Caringi's avatar Augusto Caringi

Fix 'lhist() 0 entry has 0M' (issue 63)

parent 6b3f1956
......@@ -1095,7 +1095,11 @@ std::string BPFtrace::lhist_index_label(int number)
std::ostringstream label;
if (number % mega == 0)
if (number == 0)
{
label << number;
}
else if (number % mega == 0)
{
label << number / mega << 'M';
}
......
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