From 68d6804a43dca2749a68a557e67b98e6005ead83 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 15 May 2026 01:22:19 +0200 Subject: Fix some minor issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- argon2/hash.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'argon2/hash.c') diff --git a/argon2/hash.c b/argon2/hash.c index 9223e55..9c65e6a 100644 --- a/argon2/hash.c +++ b/argon2/hash.c @@ -100,8 +100,9 @@ librecrypt__argon2__hash(char *restrict out_buffer, size_t size, const char *phr type[1u] == 's' ? LIBAR2_ARGON2DS : type[0u] == 'i' ? LIBAR2_ARGON2I : LIBAR2_ARGON2D; - params.version = version[3u] == '9' ? LIBAR2_ARGON2_VERSION_13 : /* 19 = 0x13 = 1.3 */ - LIBAR2_ARGON2_VERSION_10; /* 16 = 0x10 = 1.0 */ + params.version = !*version ? LIBAR2_ARGON2_VERSION_10 : + version[3u] == '9' ? LIBAR2_ARGON2_VERSION_13 : /* 19 = 0x13 = 1.3 */ + LIBAR2_ARGON2_VERSION_10; /* 16 = 0x10 = 1.0 */ params.t_cost = (uint_least32_t)tcost; params.m_cost = (uint_least32_t)mcost; params.lanes = (uint_least32_t)lanes; -- cgit v1.2.3-70-g09d2