Skip to content

Commit 1f59a3f

Browse files
committed
Fix reading shinies and validating pkms
1 parent 99ece51 commit 1f59a3f

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

reader_core/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

reader_core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2021"
77
no_std_io = { git = "https://github.com/zaksabeast/no_std_io.git", rev = "4bc5adf" }
88
num_enum = { version = "0.5", default-features = false }
99
once_cell = { version = "1.16", default-features = false }
10-
pkm-rs = { git = "https://github.com/zaksabeast/pkm-rs.git", rev = "a993592" }
10+
pkm-rs = { git = "https://github.com/zaksabeast/pkm-rs.git", rev = "9d1c647" }
1111
libc_alloc = "1.0.6"
1212
chrono = { version = "0.4.34", default-features = false, features = ["alloc"] }
1313

reader_core/src/gen6/reader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ impl Gen6Reader {
166166

167167
fn read_pk6(&self, offset: u32) -> Pk6 {
168168
let bytes = pnp::read_array::<{ Pk6::STORED_SIZE }>(offset);
169-
Pk6::new(bytes)
169+
Pk6::new_valid(bytes)
170170
}
171171

172172
pub fn party_pkm(&self, slot: u32) -> Pk6 {

reader_core/src/gen7/reader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl Gen7Reader {
130130

131131
fn read_pk7(&self, offset: u32) -> Pk7 {
132132
let bytes = pnp::read_array::<{ Pk7::STORED_SIZE }>(offset);
133-
Pk7::new(bytes)
133+
Pk7::new_valid(bytes)
134134
}
135135

136136
pub fn party_pkm(&self, slot: u32) -> Pk7 {

reader_core/src/transporter/reader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl TransporterReader {
4343

4444
fn read_pk7(&self, offset: u32) -> Pk7 {
4545
let bytes = pnp::read_array::<{ Pk7::STORED_SIZE }>(offset);
46-
Pk7::new(bytes)
46+
Pk7::new_valid(bytes)
4747
}
4848

4949
pub fn transported_pkm(&self, slot: u32) -> Pk7 {

0 commit comments

Comments
 (0)