diff options
author | cpldcpu <cpldcpu@gmail.com> | 2014-07-27 05:26:12 +0200 |
---|---|---|
committer | cpldcpu <cpldcpu@gmail.com> | 2014-07-27 05:26:21 +0200 |
commit | 0aacdaacd3f72668e78f2e3c957ca6d3166d1d01 (patch) | |
tree | 5c6375df31c935d9b0a5e37feee00276984c3b5f | |
parent | df94369d5291f8842d36938f7b2bb2c926cf0740 (diff) | |
download | micronucleus-0aacdaacd3f72668e78f2e3c957ca6d3166d1d01.tar.gz micronucleus-0aacdaacd3f72668e78f2e3c957ca6d3166d1d01.tar.bz2 micronucleus-0aacdaacd3f72668e78f2e3c957ca6d3166d1d01.zip |
commandline: fixed assert
devicereply can be 6 bytes in latest version.
-rw-r--r-- | commandline/library/micronucleus_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/commandline/library/micronucleus_lib.c b/commandline/library/micronucleus_lib.c index f7b51d5..e2f6791 100644 --- a/commandline/library/micronucleus_lib.c +++ b/commandline/library/micronucleus_lib.c @@ -66,7 +66,7 @@ micronucleus* micronucleus_connect(int fast_mode) { // get nucleus info unsigned char buffer[6]; int res = usb_control_msg(nucleus->device, USB_ENDPOINT_IN| USB_TYPE_VENDOR | USB_RECIP_DEVICE, 0, 0, 0, (char *)buffer, 6, MICRONUCLEUS_USB_TIMEOUT); - assert(res >= 4); + assert(res >= 6); nucleus->flash_size = (buffer[0]<<8) + buffer[1]; nucleus->page_size = buffer[2]; |