sort out the length details.

This commit is contained in:
Mariano Alvira 2010-03-07 18:48:47 -05:00
parent fb922c0ab9
commit d3f6ef07f2
3 changed files with 9 additions and 7 deletions

View file

@ -35,7 +35,7 @@ void print_packet(volatile packet_t *p) {
for(j=0, k=0; j <= ((p->length)%PER_ROW); j++) {
printf("\n\r");
for(i=0; i < PER_ROW; i++, k++) {
if(k >= (p->length + 1) ) { /* + 1 since first byte is len+2 */
if(k >= p->length ) {
printf("\n\r");
return;
}