fix shift in return of octal code section value

This commit is contained in:
Stephen Birarda 2013-03-20 16:22:01 -07:00
parent 1efbaef44b
commit e7254ff216

View file

@ -29,7 +29,7 @@ char sectionValue(unsigned char * startByte, char startIndexInByte) {
char rightShift = 8 - startIndexInByte - 3;
if (rightShift < 0) {
return ((startByte[0] << -rightShift) & 7) + (startByte[1] >> 7);
return ((startByte[0] << -rightShift) & 7) + (startByte[1] >> (8 + rightShift));
} else {
return (startByte[0] >> rightShift) & 7;
}