From 989132e4e29409958b52ba5ccd4e20ce1d0e8442 Mon Sep 17 00:00:00 2001 From: bg Date: Sun, 20 Oct 2013 18:25:40 +0200 Subject: [PATCH] small bug-fix --- hostware/commandline/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hostware/commandline/main.c b/hostware/commandline/main.c index 18e9547..2b144b3 100644 --- a/hostware/commandline/main.c +++ b/hostware/commandline/main.c @@ -167,7 +167,7 @@ void get_token(char *param){ char token[10]; int cnt; cnt = usb_control_msg(handle, USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_IN, CUSTOM_RQ_GET_TOKEN, 0, 0, token, 9, 5000); - if (cnt < 9 ) { + if (cnt <= 9 ) { token[cnt] = '\0'; printf("token = %s\n", token); } else { -- 2.39.2