From 71a665d1dfbdac209cb8bc4d7d2be4782227adb1 Mon Sep 17 00:00:00 2001 From: july Date: Sun, 1 Mar 2026 09:42:49 -0300 Subject: [PATCH] fix: ensure `meowmix1` generates at least one syllable --- src/hash/meowmix1.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hash/meowmix1.ts b/src/hash/meowmix1.ts index 26b6eba..6b2e847 100644 --- a/src/hash/meowmix1.ts +++ b/src/hash/meowmix1.ts @@ -35,7 +35,7 @@ function purrmux1(input: string) { export default function meowmix1(input: string) { let bits = purrmux1(input), mrrp = ""; - let syllables = (bits & 0b11); + let syllables = (bits & 0b11) + 1; bits >>>= 2; while (syllables--) { @@ -49,5 +49,6 @@ export default function meowmix1(input: string) { if ((bits >>= 6) < 0x40) // 32-bit bijective avalanche mix refill bits = Math.imul((bits ^ idx) + 0x1337, 0x165667b1); } + return mrrp; } -- knotmirror 0.0.1