]> Kevux Git Server - fll/commitdiff
Bugfix: don't forget to return f_none_on_eos and f_none_on_stop where applicable
authorKevin Day <kevin@kevux.org>
Wed, 21 Mar 2012 02:23:03 +0000 (21:23 -0500)
committerKevin Day <kevin@kevux.org>
Wed, 21 Mar 2012 02:23:03 +0000 (21:23 -0500)
level_1/fl_fss/c/fss_basic.c
level_1/fl_fss/c/fss_extended.c

index b23835be177ad3bd5df08b8ad1da2cd21cd82eca..b6dd2dcecacc8debe1d43ac2ac9b7069472958b5 100644 (file)
@@ -450,6 +450,12 @@ extern "C"{
       object->used = object_position.stop + 1;
     }
 
+    if (input->start > input->stop) {
+      return f_none_on_stop;
+    } else if (input->start >= buffer.used) {
+      return f_none_on_eos;
+    }
+
     return f_none;
   }
 #endif // _di_fl_fss_basic_object_write_
@@ -496,6 +502,12 @@ extern "C"{
     content->string[content_position.stop] = f_eol;
     content->used = content_position.stop + 1;
 
+    if (input->start > input->stop) {
+      return f_none_on_stop;
+    } else if (input->start >= buffer.used) {
+      return f_none_on_eos;
+    }
+
     return f_none;
   }
 #endif // _di_fl_fss_basic_content_write_
index 903bc2992deb5ac5e6e976fbea7539af945cfce0..27fd4398f15c9edba28ae08cb6cf470a45376269 100644 (file)
@@ -582,6 +582,12 @@ extern "C"{
       object->used = object_position.stop + 1;
     }
 
+    if (input->start > input->stop) {
+      return f_none_on_stop;
+    } else if (input->start >= buffer.used) {
+      return f_none_on_eos;
+    }
+
     return f_none;
   }
 #endif // _di_fl_fss_extended_object_write_