]> Kevux Git Server - fll/commitdiff
Bugfix: start position not being calculated fo fl_string functions
authorKevin Day <thekevinday@gmail.com>
Tue, 5 May 2020 04:48:08 +0000 (23:48 -0500)
committerKevin Day <thekevinday@gmail.com>
Tue, 5 May 2020 04:48:08 +0000 (23:48 -0500)
I missed adding the start position.

level_1/fl_string/c/private-string.c
level_1/fl_utf/c/private-utf.c

index 2b62f192daa6b0b8b8207658077c525d16d201f5..3643126a90122f679ac338c3e9c566874c64839b 100644 (file)
@@ -53,7 +53,7 @@ extern "C" {
             if (f_status_is_error(status)) return status;
           }
 
-          memcpy(destination->string + destination->used, source + first, length);
+          memcpy(destination->string + destination->used, source + start + first, length);
           destination->used = total;
         }
 
@@ -74,7 +74,7 @@ extern "C" {
               if (f_status_is_error(status)) return status;
             }
 
-            memcpy(destination->string + destination->used, source + first, length);
+            memcpy(destination->string + destination->used, source + start + first, length);
             destination->used = total;
           }
         }
index 48b10ec516a0cb359a2e3239cf009c80d440491c..d324f88a505bcce3064788b9f5fc11b0b82d09c6 100644 (file)
@@ -53,7 +53,7 @@ extern "C" {
             if (f_status_is_error(status)) return status;
           }
 
-          memcpy(destination->string + destination->used, source + first, length);
+          memcpy(destination->string + destination->used, source + start + first, length);
           destination->used = total;
         }
 
@@ -74,7 +74,7 @@ extern "C" {
               if (f_status_is_error(status)) return status;
             }
 
-            memcpy(destination->string + destination->used, source + first, length);
+            memcpy(destination->string + destination->used, source + start + first, length);
             destination->used = total;
           }
         }