]> Kevux Git Server - fll/commitdiff
Bugfix: Previous uint8_t to char resulted in accidental changes. 0.5.3
authorKevin Day <thekevinday@gmail.com>
Thu, 29 Apr 2021 00:13:43 +0000 (19:13 -0500)
committerKevin Day <thekevinday@gmail.com>
Thu, 29 Apr 2021 00:13:43 +0000 (19:13 -0500)
This should remain int8_t.

level_1/fl_utf_file/c/private-utf_file.c
level_1/fl_utf_file/c/private-utf_file.h

index f4fbb6a10faf302d7b07dc881efdd5780f0dfc17..4816fdff8aff9eb68efe4dba0a35bc1484bb6141 100644 (file)
@@ -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) {
index c59069428f55914a19739caf33314785122f9a20..39d65546c1baa409ec63718ce7bde2cfb4d195ef 100644 (file)
@@ -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_)
 
 /**