mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
fixed datamatrix detection (incorrect) in ean13 2
This commit is contained in:
@@ -97,7 +97,9 @@ impl ReedSolomonDecoder {
|
||||
//for (int i = 0; i < errorLocations.length; i++) {
|
||||
let log_value = self.field.log(errorLocations[i] as i32)?;
|
||||
if log_value > received.len() as i32 - 1 {
|
||||
return Ok(0);
|
||||
return Err(Exceptions::ReedSolomonException(
|
||||
"Bad error location".to_owned(),
|
||||
));
|
||||
}
|
||||
let position: isize = received.len() as isize - 1 - log_value as isize;
|
||||
if position < 0 {
|
||||
|
||||
Reference in New Issue
Block a user