From 8fbdbb12aabda25b0da53016b2819fa3a14f359b Mon Sep 17 00:00:00 2001
From: koeart <koeart@zwoelfelf.org>
Date: 周一, 24 8月 2015 06:07:53 +0800
Subject: [PATCH] Update parser example with ParamCopyText

---
 libscpi/src/parser.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libscpi/src/parser.c b/libscpi/src/parser.c
index 3475265..6a7b776 100644
--- a/libscpi/src/parser.c
+++ b/libscpi/src/parser.c
@@ -770,6 +770,10 @@
                         i_from++;
                     }
                 }
+                *copy_len = i_to;
+                if (i_to < buffer_len) {
+                    buffer[i_to] = 0;
+                }
                 break;
             default:
                 SCPI_ErrorPush(context, SCPI_ERROR_DATA_TYPE_ERROR);

--
Gitblit v1.9.1