From a4699fdc03ae66fddc98c24fae4c8f7b335b7a57 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sat, 31 Mar 2012 18:14:54 -0500 Subject: [PATCH] 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. --- level_1/fl_fss/c/fss_basic.c | 4 ++-- level_1/fl_fss/c/fss_extended.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) 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; -- 1.8.3.1