Skip to content

Commit

Permalink
add writeConstraint range validation
Browse files Browse the repository at this point in the history
  • Loading branch information
kossnikita committed Oct 3, 2023
1 parent 9ab01ef commit e07d04b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/patch/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use svd_parser::svd::{
Access, BitRange, DimElement, EnumeratedValues, Field, FieldInfo, ModifiedWriteValues,
ReadAction, Register, RegisterInfo, Usage, WriteConstraint, WriteConstraintRange,
};
use svd_rs::ValidateLevel;
use yaml_rust::{yaml::Hash, Yaml};

use super::iterators::{MatchIter, Matched};
Expand Down Expand Up @@ -720,6 +721,7 @@ impl RegisterExt for Register {
min: fmod[0].i64()? as u64,
max: fmod[1].i64()? as u64,
}));
ftag.validate(ValidateLevel::Weak)?;
set_any = true;
}
if !set_any {
Expand Down

0 comments on commit e07d04b

Please sign in to comment.