From ebd8146ae1932251398bbc0f676c57c3ed3a4164 Mon Sep 17 00:00:00 2001
From: Kevin Day <thekevinday@gmail.com>
Date: Wed, 28 Apr 2021 19:13:43 -0500
Subject: [PATCH] Bugfix: Previous uint8_t to char resulted in accidental
 changes.

This should remain int8_t.
---
 level_1/fl_utf_file/c/private-utf_file.c | 6 +++---
 level_1/fl_utf_file/c/private-utf_file.h | 3 ++-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/level_1/fl_utf_file/c/private-utf_file.c b/level_1/fl_utf_file/c/private-utf_file.c
index f4fbb6a..4816fdf 100644
--- a/level_1/fl_utf_file/c/private-utf_file.c
+++ b/level_1/fl_utf_file/c/private-utf_file.c
@@ -6,12 +6,12 @@ extern "C" {
 #endif
 
 #if !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_)
-  void private_fl_utf_file_process_read_buffer(const char *buffer_read, const ssize_t size_read, f_utf_string_dynamic_t *buffer, char buffer_char[], uint8_t *width, uint8_t *width_last) {
+  void private_fl_utf_file_process_read_buffer(const char *buffer_read, const ssize_t size_read, f_utf_string_dynamic_t *buffer, char buffer_char[], uint8_t *width, int8_t *width_last) {
+
     f_utf_character_t character = 0;
-    f_array_length_t i = 0;
     uint8_t increment_by = 0;
 
-    for (; i < size_read; i += increment_by) {
+    for (f_array_length_t i = 0; i < size_read; i += increment_by) {
       increment_by = 0;
 
       if (!*width) {
diff --git a/level_1/fl_utf_file/c/private-utf_file.h b/level_1/fl_utf_file/c/private-utf_file.h
index c590694..39d6554 100644
--- a/level_1/fl_utf_file/c/private-utf_file.h
+++ b/level_1/fl_utf_file/c/private-utf_file.h
@@ -33,13 +33,14 @@ extern "C" {
  * @param width_last
  *   The amount of width filled into buffer_char after executing this function.
  *   This may be something other than width when size_read is reached before the entire buffer_char is filled according to width.
+ *   A value of -1 designates that the last width has not been processed whereas a value of 0 designates that there is a last width and it is 0.
  *
  * @see fl_utf_file_read()
  * @see fl_utf_file_read_range()
  * @see fl_utf_file_read_until()
  */
 #if !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_)
-  void private_fl_utf_file_process_read_buffer(const char *buffer_read, const ssize_t size_read, f_utf_string_dynamic_t *buffer, char buffer_char[], uint8_t *width, uint8_t *width_last) f_attribute_visibility_internal;
+  void private_fl_utf_file_process_read_buffer(const char *buffer_read, const ssize_t size_read, f_utf_string_dynamic_t *buffer, char buffer_char[], uint8_t *width, int8_t *width_last) f_attribute_visibility_internal;
 #endif // !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_)
 
 /**
-- 
1.8.3.1