The test done is for above 25 and above 40. This gives the ranges 1-25, 26-40 and 41+.
I would not call it a "off by one" bug since it is of very different nature than the old "off by one" if you mean that the highest value in a range was not pickable.
It is worth noticing though that at times the programmers have had a problem with "less than" and "less or equal than", particulary when it comes to percentages. I think the problem is that the value tested versus is 0-99 and not 1-100. So you can see that most probably they wanted a 10% chance but tested for equal or lower to 10, giving an actual 11% chance. The case for sockets is slightly different since it is different and there is no such issue of 0-99 instead of 1-100. Perhaps just a goof though.
By the way, the only test for item types and such in the code determining number of sockets is for low quality items, they can't get it, and stackable items, they can't get it either. Seems armor could not get it in pre expansion (is that correct?) but I can be wrong.
I would not call it a "off by one" bug since it is of very different nature than the old "off by one" if you mean that the highest value in a range was not pickable.
It is worth noticing though that at times the programmers have had a problem with "less than" and "less or equal than", particulary when it comes to percentages. I think the problem is that the value tested versus is 0-99 and not 1-100. So you can see that most probably they wanted a 10% chance but tested for equal or lower to 10, giving an actual 11% chance. The case for sockets is slightly different since it is different and there is no such issue of 0-99 instead of 1-100. Perhaps just a goof though.
By the way, the only test for item types and such in the code determining number of sockets is for low quality items, they can't get it, and stackable items, they can't get it either. Seems armor could not get it in pre expansion (is that correct?) but I can be wrong.
There are three types of people in the world. Those who can count and those who can't.