summaryrefslogtreecommitdiff
path: root/libvxi11client/libvxi11client.c
diff options
context:
space:
mode:
authordaniel <danieruru@gmail.com>2013-01-13 13:46:40 +0900
committerdaniel <danieruru@gmail.com>2013-01-13 13:46:40 +0900
commit714b4e092f7dfc3bdbc6ea864e85cb144b1b7277 (patch)
treecb077b8541880c50139d13fbc8ffdce873f21176 /libvxi11client/libvxi11client.c
parent7f2e52e8dbcda238268dd7339ba8c3dce908e252 (diff)
Would help to actually pass the data read back out
Diffstat (limited to 'libvxi11client/libvxi11client.c')
-rw-r--r--libvxi11client/libvxi11client.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libvxi11client/libvxi11client.c b/libvxi11client/libvxi11client.c
index 4697775..c58ad3a 100644
--- a/libvxi11client/libvxi11client.c
+++ b/libvxi11client/libvxi11client.c
@@ -215,6 +215,8 @@ int vxi11_read(char* buffer, unsigned int bufferlen, bool waitlock, bool termchr
#ifdef DEBUG
printf("Got \"%s\" from server\n", resp->data.data_val);
#endif
+ if (buffer != NULL)
+ strncpy(buffer, resp->data.data_val, (bufferlen < resp->data.data_len ? bufferlen : resp->data.data_len));
return resp->data.data_len;
}
else if (resp == NULL)