From: Kevin Day Date: Sun, 17 Nov 2019 07:15:10 +0000 (-0600) Subject: Bugfix: incorrect operators used in comparison X-Git-Tag: 0.5.0~375 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=c6c3f9eb3924e7cbe692fe2778417b2fa82c16cf;p=fll Bugfix: incorrect operators used in comparison Should be using '&&' and not '||' when making sure the character is in the expected range. --- 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) {