From bcd89964a47e340191b785140e885ff1d4f87ae6 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Mon, 5 Aug 2024 21:00:29 -0500 Subject: [PATCH] Update: Apply the not operator logic to avoid needing to literally specify it. --- level_3/fake/c/main/make/operate_validate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/level_3/fake/c/main/make/operate_validate.c b/level_3/fake/c/main/make/operate_validate.c index 5b99b65..88c20a8 100644 --- a/level_3/fake/c/main/make/operate_validate.c +++ b/level_3/fake/c/main/make/operate_validate.c @@ -97,13 +97,13 @@ extern "C" { if (!name.used) return F_data_not; - if (!((uint16_t) (name.string[0] - 'a') < 26 || (uint16_t) (name.string[0] - 'A') < 26)) { + if ((uint16_t) (name.string[0] - 'a') > 25 && (uint16_t) (name.string[0] - 'A') > 25) { if (name.string[0] != '_') return F_false; } for (f_number_unsigned_t i = 1; i < name.used; ++i) { - if (!((uint16_t) (name.string[i] - 'a') < 26 || (uint16_t) (name.string[i] - 'A') < 26 || (uint16_t) (name.string[i] - '0') < 10)) { + if ((uint16_t) (name.string[i] - 'a') > 25 && (uint16_t) (name.string[i] - 'A') > 25 && (uint16_t) (name.string[i] - '0') > 9) { if (name.string[i] != '_') return F_false; } } // for -- 1.8.3.1