From add6b442eb26767d843f9c7e46e4378b608e566a Mon Sep 17 00:00:00 2001 From: xolatile Date: Mon, 20 Nov 2023 20:51:26 -0500 Subject: [PATCH] Fixed a bug... --- xyntax.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/xyntax.c b/xyntax.c index f60d300..c46c3d5 100644 --- a/xyntax.c +++ b/xyntax.c @@ -91,9 +91,19 @@ int syntax_select (char * string, int * length) { for (select = offset = 0; select != syntax_count; ++select) { if (syntax_enrange [select] == FALSE) { - if (string_compare_limit (string, syntax_begin [select], string_length (syntax_begin [select])) == TRUE) { - break; + if (syntax_derange [select] == FALSE) { + if (string_compare_limit (string, syntax_begin [select], string_length (syntax_begin [select])) == TRUE) { + break; + } + } else { + if ((string_compare_limit (string, syntax_begin [select], string_length (syntax_begin [select])) == TRUE) + && (character_compare_array (string [offset + string_length (syntax_begin [select])], syntax_end [select]) == TRUE)) { + break; + } } + /*if (string_compare_limit (string, syntax_begin [select], string_length (syntax_begin [select])) == TRUE) { + break; + }*/ } else { for (subset = 0; subset != string_length (syntax_begin [select]); ++subset) { if (string [offset] == syntax_begin [select] [subset]) {