From fc64a68c7558fb5c508c234467aa7e77d33b163e Mon Sep 17 00:00:00 2001 From: J08nY Date: Thu, 6 Apr 2017 23:15:50 +0200 Subject: Fix inputs with leading zero --- src/io/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/io/input.c b/src/io/input.c index 49910f1..462ad1b 100644 --- a/src/io/input.c +++ b/src/io/input.c @@ -28,7 +28,7 @@ static GEN input_i(const char *prompt, long bits) { for (size_t i = 0, j = 0; (line[j] = line[i]); j += !isspace(line[i++])) ; - if (len <= 3 || (line[0] != '0' && (line[1] != 'x' || line[1] != 'X'))) { + if (len <= 3 || !(line[0] == '0' && (line[1] == 'x' || line[1] == 'X'))) { char *new_line = realloc(line, (size_t)(len + 2)); if (!new_line) { perror("Couldn't alloc."); -- cgit v1.2.3-70-g09d2