From 588615cd617d1f6cf4fc18c5f075ba937780c118 Mon Sep 17 00:00:00 2001 From: Jan Breuer <jan.breuer@jaybee.cz> Date: ćšć, 10 9æ 2015 03:43:45 +0800 Subject: [PATCH] Add stub files for expression handling --- examples/common/scpi-def.cpp | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/common/scpi-def.cpp b/examples/common/scpi-def.cpp index c53fa4f..c69af2e 100644 --- a/examples/common/scpi-def.cpp +++ b/examples/common/scpi-def.cpp @@ -167,8 +167,9 @@ char buffer[100]; size_t copy_len; - buffer[0] = 0; - SCPI_ParamCopyText(context, buffer, 100, ©_len, false); + if(!SCPI_ParamCopyText(context, buffer, sizeof(buffer), ©_len, false)) { + buffer[0] = '\0'; + } fprintf(stderr, "TEXT: ***%s***\r\n", buffer); -- Gitblit v1.9.1