diff options
Diffstat (limited to 'agent')
-rw-r--r-- | agent/tcf/services/expressions.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/agent/tcf/services/expressions.c b/agent/tcf/services/expressions.c index f777fa9b..14f2fbc0 100644 --- a/agent/tcf/services/expressions.c +++ b/agent/tcf/services/expressions.c @@ -267,7 +267,10 @@ static int next_dec(void) { static int next_char_val(void) { int n = 0; - if (text_ch == '\\') { + if (text_ch == 0) { + error(ERR_INV_EXPRESSION, "Unexpected end of expression"); + } + else if (text_ch == '\\') { next_ch(); switch (text_ch) { case 'n' : n = '\n'; break; |