]> git.codecow.com Git - libnemo.git/commitdiff
Fix off-by-one error.
authorChris Duncan <chris@codecow.com>
Mon, 10 Aug 2026 05:15:21 +0000 (22:15 -0700)
committerChris Duncan <chris@codecow.com>
Mon, 10 Aug 2026 05:15:21 +0000 (22:15 -0700)
src/lib/vault/vault-worker.ts

index 5999caa5823bc42defbae442f0ee938d25ce6a6e..e2faa78f526d945626e5f992008c77e4d59d780d 100644 (file)
@@ -198,7 +198,7 @@ function derive (index?: Uint32Array): Promise<Record<string, number | ArrayBuff
                if (index == null) {
                        throw new VaultError('Invalid wallet account index(es)')
                }
-               if (index.length > MAX_DERIVATIONS) {
+               if (index.length > MAX_DERIVATIONS + 1) {
                        throw new VaultError('Maximum 1000 accounts per call')
                }
                const promises = []