From 6fcd960741559420772d6794ba450b87c367596c Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Mon, 5 Aug 2024 21:18:05 -0500 Subject: [PATCH] Update: Apply the not operator logic to avoid needing to literally specify it. --- level_3/fake/c/private-make-operate_validate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/level_3/fake/c/private-make-operate_validate.c b/level_3/fake/c/private-make-operate_validate.c index 18ebc15..39bebf0 100644 --- a/level_3/fake/c/private-make-operate_validate.c +++ b/level_3/fake/c/private-make-operate_validate.c @@ -93,13 +93,13 @@ extern "C" { if (!name.used) return F_none; - 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_array_length_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