]> Kevux Git Server - fll/commitdiff
Bugfix: set stop point to before a valid close quote, not after
authorKevin Day <kevin@kevux.org>
Sat, 31 Mar 2012 23:14:54 +0000 (18:14 -0500)
committerKevin Day <kevin@kevux.org>
Sat, 31 Mar 2012 23:15:08 +0000 (18:15 -0500)
The following reproduces the error:
- fss_basic_write -t object -s 'Hell o\' | fss_basic_read -o
Should produce the original string, but instead included the double quote used to signify object close.

level_1/fl_fss/c/fss_basic.c
level_1/fl_fss/c/fss_extended.c

index f5d84d1c403aa4740df79901efc8af37c979580b..5be601b54407ac64e7bf762a8e68854d4114e9cc 100644 (file)
@@ -191,7 +191,7 @@ extern "C"{
               } else if (buffer->string[input->start] == f_eol) {
                 fl_macro_fss_apply_delimit_placeholders((*buffer), delimits);
 
-                found->stop = input->start - 1;
+                found->stop = location - 1;
                 input->start++;
 
                 return fl_fss_found_object_no_content;
@@ -199,7 +199,7 @@ extern "C"{
 
               fl_macro_fss_apply_delimit_placeholders((*buffer), delimits);
 
-              found->stop = input->start - 1;
+              found->stop = location - 1;
               input->start++;
               return fl_fss_found_object;
             } else {
index 2ae99a495ba7590903af8c8e9e179a8a9f47c406..29b862d45cd1c6907264048029785e1cad742ef0 100644 (file)
@@ -185,7 +185,7 @@ extern "C"{
               } else if (buffer->string[input->start] == f_eol) {
                 fl_macro_fss_apply_delimit_placeholders((*buffer), delimits);
 
-                found->stop = input->start - 1;
+                found->stop = location - 1;
                 input->start++;
 
                 return fl_fss_found_object_no_content;
@@ -193,7 +193,7 @@ extern "C"{
 
               fl_macro_fss_apply_delimit_placeholders((*buffer), delimits);
 
-              found->stop = input->start - 1;
+              found->stop = location - 1;
               input->start++;
               return fl_fss_found_object;
             } else {
@@ -476,14 +476,14 @@ extern "C"{
                 } else if (buffer->string[input->start] == f_eol) {
                   fl_macro_fss_apply_delimit_placeholders((*buffer), delimits);
 
-                  found->array[found->used].stop = input->start - 1;
+                  found->array[found->used].stop = location - 1;
                   input->start++;
                   found->used++;
 
                   return fl_fss_found_content;
                 }
 
-                found->array[found->used].stop = input->start - 1;
+                found->array[found->used].stop = location - 1;
                 input->start++;
                 found->used++;
                 continue;