From 1c0ad81a87bf0a8b60e0d039e75b2a3c632d2221 Mon Sep 17 00:00:00 2001 From: Stephan Bosch <stephan@rename-it.nl> Date: Fri, 19 Dec 2008 17:27:56 +0100 Subject: [PATCH] Small cosmetic changes to lexer sources. --- src/lib-sieve/sieve-lexer.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib-sieve/sieve-lexer.c b/src/lib-sieve/sieve-lexer.c index e66c35897..4021da440 100644 --- a/src/lib-sieve/sieve-lexer.c +++ b/src/lib-sieve/sieve-lexer.c @@ -691,6 +691,8 @@ static bool sieve_lexer_scan_raw_token(struct sieve_lexer *lexer) if ( sieve_lexer_curchar(lexer) == '\n' ) { sieve_lexer_shift(lexer); + /* End of multi-line string */ + /* Check whether length limit was violated */ if ( str_len(str) > SIEVE_MAX_STRING_LEN ) { sieve_lexer_error(lexer, @@ -708,15 +710,15 @@ static bool sieve_lexer_scan_raw_token(struct sieve_lexer *lexer) sieve_lexer_error(lexer, "found stray carriage-return (CR) character " "in multi-line string started at line %d", start_line); - lexer->token_type = STT_ERROR; - return FALSE; + lexer->token_type = STT_ERROR; + return FALSE; } /* Handle dot-stuffing */ if ( str_len(str) <= SIEVE_MAX_STRING_LEN ) str_append_c(str, '.'); - if ( sieve_lexer_curchar(lexer) == '.' ) - sieve_lexer_shift(lexer); + if ( sieve_lexer_curchar(lexer) == '.' ) + sieve_lexer_shift(lexer); } /* Scan the rest of the line */ -- GitLab