From fa5dc4d115bcf3324295da07851f2224c9c25bf8 Mon Sep 17 00:00:00 2001 From: Jan Breuer <jan.breuer@jaybee.cz> Date: ćšć, 26 11æ 2015 03:46:35 +0800 Subject: [PATCH] Add more tests to *SRE and *RST --- libscpi/src/expression.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/libscpi/src/expression.c b/libscpi/src/expression.c index 308a953..010b40b 100644 --- a/libscpi/src/expression.c +++ b/libscpi/src/expression.c @@ -193,7 +193,7 @@ size_t i = 0; while (scpiLex_DecimalNumericProgramData(state, ¶m)) { if (i < length) { - SCPI_ParamToInt(context, ¶m, &values[i]); + SCPI_ParamToInt32(context, ¶m, &values[i]); } if (scpiLex_SpecificCharacter(state, ¶m, '!')) { @@ -303,5 +303,11 @@ if (res == SCPI_EXPR_ERROR) { SCPI_ErrorPush(context, SCPI_ERROR_EXPRESSION_PARSING_ERROR); } + if (res == SCPI_EXPR_NO_MORE) { + if (!scpiLex_IsEos(&lex)) { + res = SCPI_EXPR_ERROR; + SCPI_ErrorPush(context, SCPI_ERROR_EXPRESSION_PARSING_ERROR); + } + } return res; } -- Gitblit v1.9.1