projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fixed RNDISEthernet demos crashing when calculating checksums for Ethernet/TCP packet...
[pub/USBasp.git]
/
Demos
/
Device
/
ClassDriver
/
RNDISEthernet
/
Lib
/
Ethernet.c
diff --git
a/Demos/Device/ClassDriver/RNDISEthernet/Lib/Ethernet.c
b/Demos/Device/ClassDriver/RNDISEthernet/Lib/Ethernet.c
index
a3a42e2
..
e34f824
100644
(file)
--- a/
Demos/Device/ClassDriver/RNDISEthernet/Lib/Ethernet.c
+++ b/
Demos/Device/ClassDriver/RNDISEthernet/Lib/Ethernet.c
@@
-120,7
+120,7
@@
uint16_t Ethernet_Checksum16(void* Data, uint16_t Bytes)
uint16_t* Words = (uint16_t*)Data;
uint32_t Checksum = 0;
- for (uint
8
_t CurrWord = 0; CurrWord < (Bytes >> 1); CurrWord++)
+ for (uint
16
_t CurrWord = 0; CurrWord < (Bytes >> 1); CurrWord++)
Checksum += Words[CurrWord];
while (Checksum & 0xFFFF0000)