mIRC Home    About    Download    Register    News    Help

Print Thread
#269714 22/12/21 05:21 PM
Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
re: https://forums.mirc.com/ubbthreads.php/topics/269577/edge-cases-with-bytes

I see the new beta shows $bytes().suf showing PB for large inputs. However this has affected the 't' switch, which now outputs the quantity of terabytes, which causes the 't' switch to replicate the behavior of the unmentioned new 'p' switch:

//var -s %a $calc(1*1024^4) | echo -a $bytes(%a,g) vs $bytes(%a,t) vs $bytes(%a,p) vs $bytes(%a).suf

result: 1,024 vs 0.00098 vs 0.00098 vs 1TB
should be: 1,024 vs 1 vs 0.00098 vs 1TB

//var -s %a $calc(1*1024^5) | echo -a $bytes(%a,g) vs $bytes(%a,t) vs $bytes(%a,p) vs $bytes(%a).suf
result: 1,048,576 vs 1 vs 1 vs 1PB
should be: 1,048,576 vs 1,024 vs 1 vs 1PB

Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
Thanks for testing this. This issue has been fixed for the next beta.


Link Copied to Clipboard