From: Kevin Day Date: Fri, 26 Jun 2020 02:54:12 +0000 (-0500) Subject: Bugfix: read overflows the per character scanning X-Git-Tag: 0.5.0~126 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=2e33adad79f4007e888ee8d7b05323f0c2fb31ca;p=fll 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. --- 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; }