This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "krobot".
The branch, master has been updated
via a5fddbe02e67831b0025060be4a9ca30827f82f4 (commit)
from 318972860cd4780ebc131f01cd87017239268874 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a5fddbe02e67831b0025060be4a9ca30827f82f4
Author: Nicolas Dandrimont <Nic...@cr...>
Date: Sun Apr 10 23:07:23 2011 +0200
[USB_CAN] Fix off by one error in size verifications
-----------------------------------------------------------------------
Changes:
diff --git a/elec/boards/USB_CAN/Firmware/usb_can/usb_can/usb_can.c b/elec/boards/USB_CAN/Firmware/usb_can/usb_can/usb_can.c
index f1e6314..259d2d5 100644
--- a/elec/boards/USB_CAN/Firmware/usb_can/usb_can/usb_can.c
+++ b/elec/boards/USB_CAN/Firmware/usb_can/usb_can/usb_can.c
@@ -137,7 +137,7 @@ int usb_can_execute_command(usb_can *usbcan, char *command, size_t len) {
frame.dlc = nibble_to_uint32(&command[9], 1);
for (i = 0; i < frame.dlc; i++)
frame.data8[i] = nibble_to_uint32(&command[10 + 2*i], 2);
- if (len == (size_t)(8 + 1 + 2*frame.dlc))
+ if (len == (size_t)(9 + 1 + 2*frame.dlc))
send = true;
else
broken = true;
@@ -151,7 +151,7 @@ int usb_can_execute_command(usb_can *usbcan, char *command, size_t len) {
frame.dlc = nibble_to_uint32(&command[4], 1);
for (i = 0; i < frame.dlc; i++)
frame.data8[i] = nibble_to_uint32(&command[5 + 2*i], 2);
- if (len == (size_t)(3 + 1 + 2*frame.dlc))
+ if (len == (size_t)(4 + 1 + 2*frame.dlc))
send = true;
else
broken = true;
hooks/post-receive
--
krobot
|