From 3fe9a4206893c4ad1525a33976b83471b96c3d34 Mon Sep 17 00:00:00 2001 From: woxtu Date: Wed, 13 Dec 2023 05:56:57 +0900 Subject: [PATCH] Fix the minimum length assertion --- Sources/sqids/Sqids.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/sqids/Sqids.swift b/Sources/sqids/Sqids.swift index 66311e8..77b8e2b 100644 --- a/Sources/sqids/Sqids.swift +++ b/Sources/sqids/Sqids.swift @@ -55,8 +55,8 @@ public struct Sqids { "Alphabet length must be at least \(Self.minAlphabetLength)" ) assert( - minLength >= 0 && minLength < Self.minLengthLimit, - "Alphabet length must be at least \(Self.minAlphabetLength)" + minLength >= 0 && minLength <= Self.minLengthLimit, + "Minimum length has to be between 0 and \(Self.minLengthLimit)" ) assert( alphabet.reduce(true, { $0 && $1.isASCII }),