Bug #5515
closed/window -jN should use max value for overflowing values
0%
Description
Hello,
I was testing to /loadbuf a file into a @window with more than 165k of lines, it seems that AdiIRC when creating a /window -jN it sticks on 500 and ignores the N parameter for larger windows buffer.
Example:
//window -hj100000000000 @test //loadbuf @test big_file.txt //echo -a IS: $line(@test,0) == this will return 500 even if the big_file.txt has more than 500 lines.
- Thanks!
Updated by westor (GR) over 2 years ago
An other reproduce code that may help you more is: https://mypastebin.com/FVCfN6MXi
Updated by Per Amundsen over 2 years ago
- Subject changed from /window -jN does not working to /window -jN should use max value for overflowing values
- Status changed from New to Resolved
The number you enter are too large, the max value is 2147483647.
I made a check to use the max value if the entered number is larger.
Updated by westor (GR) over 2 years ago
Thanks for applying that fix, if it is possible to mention under https://dev.adiirc.com/projects/adiirc/wiki/window page that -jN has 2147483647 limitation to remember the maximum.
Updated by Per Amundsen over 2 years ago
2147483647 is the maximum for a integer, it is not the maximum for number of lines.
Documenting a maximum number gives the impression that it is possible and supported to reach such a high number.
It is not realistic to reach such high number of lines since maximum number of lines involves many dynamic factors such as how much memory is available, whether using 32 or 64 bit, limitations of .net internals such as maximum size of a list and so on.