gin
gin copied to clipboard
Prevent slice out of bounds access before panic
Previously, when the error would be triggered, it was possible that a slice out of bounds panic would occur before the intended panic message. I've added a nil/slice length check to make sure that does not happen.
With that said, I am not very familiar with the library so I cannot determine what this catch was supposed to mean, or convey, to users of the library. It would be helpful to know what I can do to make the error message more useful.
Thanks.
Fixes #3126