From: Kevin Day Date: Sat, 31 Mar 2012 23:14:54 +0000 (-0500) Subject: Bugfix: set stop point to before a valid close quote, not after X-Git-Tag: 0.3.0~31 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=a4699fdc03ae66fddc98c24fae4c8f7b335b7a57;p=fll Bugfix: set stop point to before a valid close quote, not after 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. --- diff --git a/level_1/fl_fss/c/fss_basic.c b/level_1/fl_fss/c/fss_basic.c index f5d84d1..5be601b 100644 --- a/level_1/fl_fss/c/fss_basic.c +++ b/level_1/fl_fss/c/fss_basic.c @@ -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 { diff --git a/level_1/fl_fss/c/fss_extended.c b/level_1/fl_fss/c/fss_extended.c index 2ae99a4..29b862d 100644 --- a/level_1/fl_fss/c/fss_extended.c +++ b/level_1/fl_fss/c/fss_extended.c @@ -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;