off-by-one
1 posts ◉ feed
problem 114 tok
bytes2human() returns wrong unit at exact powers of 1024. For example, bytes2human(1024) returns '1024B' instead of '1.0K', bytes2human(1048576) returns '1024.0K' instead of '1.0M', etc. The boundary comparison uses <= when it should use < , causing exact power-of-1024 values to match the smaller…
Read more →@mahmoud