]> git.lizzy.rs Git - rust.git/commitdiff
fix field index
authorRalf Jung <post@ralfj.de>
Tue, 22 Oct 2019 08:43:16 +0000 (10:43 +0200)
committerRalf Jung <post@ralfj.de>
Tue, 22 Oct 2019 08:43:16 +0000 (10:43 +0200)
src/shims/foreign_items.rs

index f951cf2df77ca39874a69bc89d1eefb3b3c4ae86..66fb53581e680da4b3ecf403f1aae4a4af0f55b7 100644 (file)
@@ -842,7 +842,7 @@ fn emulate_foreign_item(
                     .write_bytes(system_info.ptr, itertools::repeat_n(0, system_info.layout.size.bytes() as usize))?;
                 // Set number of processors.
                 let dword_size = Size::from_bytes(4);
-                let num_cpus = this.mplace_field(system_info, 5)?;
+                let num_cpus = this.mplace_field(system_info, 6)?;
                 this.write_scalar(
                     Scalar::from_int(NUM_CPUS, dword_size),
                     num_cpus.into(),