several backported fixes (some are not supported and are not included in tests)

This commit is contained in:
Henry Schimke
2023-01-28 18:33:58 -06:00
parent e4f6fe0daf
commit e024573905
6 changed files with 9 additions and 8 deletions

View File

@@ -688,7 +688,7 @@ fn decodeECISegment(bits: &mut BitSource, result: &mut ECIStringBuilder) -> Resu
let secondByte = bits.readBits(8)?;
if firstByte <= 191 {
return result.appendECI(firstByte - 1);
return result.appendECI((firstByte - 128) * 254 + 127 + secondByte - 1);
}
let thirdByte = bits.readBits(8)?;