From 2e33adad79f4007e888ee8d7b05323f0c2fb31ca Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Thu, 25 Jun 2020 21:54:12 -0500 Subject: [PATCH] Bugfix: read overflows the per character scanning There is a logic mistake where the buffer is incremented too many times before the next loop. This results in skipping some of the characters in the file and if those skipped characters are part of a vocabulary and content, then it will not be detected. --- level_0/f_iki/c/iki.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/level_0/f_iki/c/iki.c b/level_0/f_iki/c/iki.c index 1533031..5762e42 100644 --- a/level_0/f_iki/c/iki.c +++ b/level_0/f_iki/c/iki.c @@ -167,16 +167,7 @@ extern "C" { return status; } - if (status == F_false) { - status = f_utf_buffer_increment(*buffer, range, 1); - if (F_status_is_error(status)) { - f_macro_string_lengths_delete(status, delimits); - return status; - } - - find_next = F_true; - break; - } + if (status == F_false) break; } status = f_utf_buffer_increment(*buffer, range, 1); @@ -433,13 +424,6 @@ extern "C" { } // while } else { - - status = f_utf_buffer_increment(*buffer, range, 1); - if (F_status_is_error(status)) { - f_macro_string_lengths_delete(status, delimits); - return status; - } - vocabulary_delimited = F_false; find_next = F_true; } -- 1.8.3.1