bins: fix ndpi_set_bin, ndpi_inc_bin and ndpi_get_bin_value#2536
Conversation
When the required slot is too big, use the latest/bigger available bin, not in the first one.
|
utoni
left a comment
There was a problem hiding this comment.
Doesn't it make more sense to let the library crash if someone uses it the wrong way instead of modifying already doomed code? 😃
|
Current code doesn't crash; it simply puts "big" values in the first slot. |
Sometimes it can be useful to let a library crash, especially if some third party uses the API in the wrong way. But I just saw that there is no documentation in |



When the required slot is too big, use the latest/bigger available bin, not in the first one.