summaryrefslogtreecommitdiff
path: root/build.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-26 00:01:57 -0400
committerpommicket <pommicket@gmail.com>2023-08-26 00:02:14 -0400
commit1c783f9cf5387f658368f21ebe15e5e8008c5fe2 (patch)
tree7436a037e6bf43bdaaeee614ed74c93737efdb23 /build.c
parentda57a4738f0d447d9c8bf322c486de6b3e177c48 (diff)
fix selector_render for cutoff entries, uninitialized read in build.c
Diffstat (limited to 'build.c')
-rw-r--r--build.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/build.c b/build.c
index 265c7ac..59bf72c 100644
--- a/build.c
+++ b/build.c
@@ -210,7 +210,10 @@ static int parse_nonnegative_integer(char32_t **str, char32_t *end) {
char32_t *s = *str;
int number_len;
int n = 0;
- for (number_len = 0; s != end && s[number_len] >= '0' && s[number_len] <= '9'; ++number_len) {
+ for (number_len = 0;
+ &s[number_len] < end
+ && s[number_len] >= '0' && s[number_len] <= '9';
+ ++number_len) {
n *= 10;
n += (int)s[number_len] - '0';
}