From c6c3f9eb3924e7cbe692fe2778417b2fa82c16cf Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 17 Nov 2019 01:15:10 -0600 Subject: [PATCH] Bugfix: incorrect operators used in comparison Should be using '&&' and not '||' when making sure the character is in the expected range. --- level_0/f_conversion/c/conversion.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/level_0/f_conversion/c/conversion.c b/level_0/f_conversion/c/conversion.c index ed2b7f0..69c7a9d 100644 --- a/level_0/f_conversion/c/conversion.c +++ b/level_0/f_conversion/c/conversion.c @@ -781,7 +781,7 @@ extern "C" { *number = 0; return f_none; } - else if (string[j] > 0x29 || string[j] < 0x3a) { + else if (string[j] > 0x29 && string[j] < 0x3a) { mode = 10; } else if (string[j] == 0x78 || string[j] == 0x58) { @@ -930,7 +930,7 @@ extern "C" { *number = 0; return f_none; } - else if (string[j] > 0x29 || string[j] < 0x3a) { + else if (string[j] > 0x29 && string[j] < 0x3a) { mode = 10; } else if (string[j] == 0x78 || string[j] == 0x58) { -- 1.8.3.1