1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-06-17 17:14:51 +02:00

Depth: enable comparison with lengths >255 [hack?]

The "infinity and beyond" authentication test performs a comparison against a length > 255. Transforming that length into a "Depth" object for comparison failed without this patch.
This commit is contained in:
Heiko Schaefer 2023-07-09 17:18:45 +02:00
parent 39603fa35d
commit 144ebc9c63
No known key found for this signature in database
GPG key ID: 4A849A1904CCBD7D

View file

@ -34,7 +34,7 @@ class Depth private constructor(val limit: Int?) : Comparable<Depth> {
*/
@JvmStatic
fun auto(limit: Int): Depth {
return if (limit == 255) {
return if (limit >= 255) {
unconstrained()
} else {
limited(limit)