diff options
Diffstat (limited to 'src/statement.c')
-rw-r--r-- | src/statement.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/statement.c b/src/statement.c index f81e0123..fccf71c1 100644 --- a/src/statement.c +++ b/src/statement.c @@ -313,6 +313,11 @@ const char *get_rate(uint64_t byte_rate, uint64_t *rate) { int i; + if (!byte_rate) { + *rate = 0; + return data_unit[0]; + } + for (i = 0; data_unit[i + 1] != NULL; i++) { if (byte_rate % 1024) break; |