diff options
Diffstat (limited to 'examples/plugins/mem')
-rw-r--r-- | examples/plugins/mem | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/plugins/mem b/examples/plugins/mem index 01f7e9c..518b21d 100644 --- a/examples/plugins/mem +++ b/examples/plugins/mem @@ -49,7 +49,7 @@ def redraw(): def u(b): unit = 0 units = ['KB', 'MB', 'GB', 'TB', 'PB', 'EB'] - while (unit < len(units)) and (b >= 1024): + while (unit + 1 < len(units)) and (b >= 1024): b /= 1024 unit += 1 return '%.0f%s' % (b, units[unit]) |