From e80dad01fcbb3f539d20a8ceeb5e84c81b5c4307 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Mon, 2 May 2022 20:32:21 +0200 Subject: [PATCH] Fix bug 581, reported by Adam Denton --- src/misc/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc/string.c b/src/misc/string.c index 4001c1335..f3863521e 100644 --- a/src/misc/string.c +++ b/src/misc/string.c @@ -217,7 +217,7 @@ int get_int_n(const char *str, size_t n, int *p_value) /* Iterate over chars until end or char that is not numeric */ for ( ; p_cur != p_end; ++p_cur) { - char ch_cur = *str; + char ch_cur = *p_cur; if (!isdigit(ch_cur)) { /* Test for exit due to non-numeric char */ break; }