mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 16:55:07 +02:00
fix shift in return of octal code section value
This commit is contained in:
parent
1efbaef44b
commit
e7254ff216
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue