Correct a couple of packet length calculations.

main
Keith Whitwell 2004-07-23 16:12:27 +00:00
parent 6ed7e36f4c
commit 1e5354e867
2 changed files with 16 additions and 2 deletions

View File

@ -306,7 +306,14 @@ static int do_validate_cmd( int cmd )
case 0x1c:
return 1;
case 0x1d:
switch ((cmd>>16)&0xff) {
case 0x3:
return (cmd & 0x1f) + 2;
case 0x4:
return (cmd & 0xf) + 2;
default:
return (cmd & 0xffff) + 2;
}
case 0x1e:
if (cmd & (1<<23))
return (cmd & 0xffff) + 1;

View File

@ -306,7 +306,14 @@ static int do_validate_cmd( int cmd )
case 0x1c:
return 1;
case 0x1d:
switch ((cmd>>16)&0xff) {
case 0x3:
return (cmd & 0x1f) + 2;
case 0x4:
return (cmd & 0xf) + 2;
default:
return (cmd & 0xffff) + 2;
}
case 0x1e:
if (cmd & (1<<23))
return (cmd & 0xffff) + 1;