mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2004
Posts: 871
Sat Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
mIRC seems to limit hash table entries to the line length limit (~4100) counted in UTF-8 bytes, rather than in characters. Moreover, when it hits the byte-based limit, it will silently truncate the resulting entry.

Code:
//var %s = $str($chr(127),4100) | hmake test 10 | hadd -m test test %s | echo -ag $len($hget(test,test)) | :error | hfree test

This piece of code correctly echoes 4100. Increasing to 4140 results in "/hadd: line too long" as expected.

Code:
//var %s = $str($chr(128),4100) | hmake test 10 | hadd -m test test %s | echo -ag $len($hget(test,test)) | :error | hfree test

In contrast, this piece of code echoes 2075. No error is thrown.


Saturn, QuakeNet staff
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
Thanks, this has been fixed for the next version.


Link Copied to Clipboard