From: bg Date: Sun, 20 Oct 2013 16:25:40 +0000 (+0200) Subject: small bug-fix X-Git-Url: https://git.cryptolib.org/?a=commitdiff_plain;h=989132e4e29409958b52ba5ccd4e20ce1d0e8442;p=labortage2013badge.git small bug-fix --- 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 {