From 919679967804f48ce8ff15cf4b172e28071a367a Mon Sep 17 00:00:00 2001 From: Jan Breuer <jan.breuer@jaybee.cz> Date: ćšć, 01 10æ 2015 17:03:03 +0800 Subject: [PATCH] Add building of shared library --- examples/common/scpi-def.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/common/scpi-def.c b/examples/common/scpi-def.c index 4e690b8..da8e847 100644 --- a/examples/common/scpi-def.c +++ b/examples/common/scpi-def.c @@ -170,8 +170,9 @@ char buffer[100]; size_t copy_len; - SCPI_ParamCopyText(context, buffer, sizeof(buffer), ©_len, FALSE); - buffer[copy_len] = '\0'; + if (!SCPI_ParamCopyText(context, buffer, sizeof(buffer), ©_len, FALSE)) { + buffer[0] = '\0'; + } fprintf(stderr, "TEXT: ***%s***\r\n", buffer); -- Gitblit v1.9.1