File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ This changelog tracks the Rust `svdtools` project. See
77
88* Revert #145
99* Improve "Could not find errors"
10+ * use register size as dimIncrement for 1-element arrays
1011
1112## [ v0.3.3] 2023-10-02
1213
Original file line number Diff line number Diff line change @@ -1202,7 +1202,15 @@ fn collect_in_array(
12021202 . iter ( )
12031203 . map ( |r| r. address_offset )
12041204 . collect :: < Vec < _ > > ( ) ;
1205- let dim_increment = if dim > 1 { offsets[ 1 ] - offsets[ 0 ] } else { 0 } ;
1205+ let dim_increment = if dim > 1 {
1206+ offsets[ 1 ] - offsets[ 0 ]
1207+ } else {
1208+ registers[ 0 ]
1209+ . properties
1210+ . size
1211+ . map ( |s| s / 8 )
1212+ . unwrap_or_default ( )
1213+ } ;
12061214 if !check_offsets ( & offsets, dim_increment) {
12071215 return Err ( anyhow ! (
12081216 "{}: registers cannot be collected into {rspec} array. Different addressOffset increments" ,
You can’t perform that action at this time.
0 commit comments