From 4e01ae716c25937daa7d1c82e6d0da8fdd0ad857 Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 18 Jan 2013 03:51:04 +0900 Subject: Add prefix, fix read (probably leaks..). --- libvxi11client/libvxi11client.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libvxi11client/libvxi11client.c') diff --git a/libvxi11client/libvxi11client.c b/libvxi11client/libvxi11client.c index a6a5dd2..f2de6bb 100644 --- a/libvxi11client/libvxi11client.c +++ b/libvxi11client/libvxi11client.c @@ -213,6 +213,10 @@ int vxi11_read(VXI11Context* context, char* buffer, unsigned int bufferlen, bool #endif if (buffer != NULL) strncpy(buffer, resp->data.data_val, (bufferlen < resp->data.data_len ? bufferlen : resp->data.data_len)); +#ifdef DEBUG + else + printf("Supplied buffer is null!\n"); +#endif return resp->data.data_len; } else if (resp == NULL) -- cgit