mirror of
https://github.com/lifegpc/libtlg-rs.git
synced 2026-07-08 01:33:22 +08:00
Fix bug
This commit is contained in:
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -164,7 +164,7 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libtlg-rs"
|
name = "libtlg-rs"
|
||||||
version = "0.1.3"
|
version = "0.1.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"overf",
|
"overf",
|
||||||
@@ -253,7 +253,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tlg"
|
name = "tlg"
|
||||||
version = "0.1.3"
|
version = "0.1.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"libtlg-rs",
|
"libtlg-rs",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "libtlg-rs"
|
name = "libtlg-rs"
|
||||||
version = "0.1.3"
|
version = "0.1.4"
|
||||||
description = "Rust version of libtlg"
|
description = "Rust version of libtlg"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ pub fn is_valid_tlg(data: &[u8]) -> bool {
|
|||||||
if data.len() < 11 {
|
if data.len() < 11 {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
data == b"TLG0.0\x00sds\x1a" || data == b"TLG5.0\x00raw\x1a" || data == b"TLG6.0\x00raw\x1a"
|
data.starts_with(b"TLG0.0\x00sds\x1a") || data.starts_with(b"TLG5.0\x00raw\x1a") || data.starts_with(b"TLG6.0\x00raw\x1a")
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Check if it's a valid TLG.
|
/// Check if it's a valid TLG.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tlg"
|
name = "tlg"
|
||||||
version = "0.1.3"
|
version = "0.1.4"
|
||||||
description = "Tools to process TLG image file."
|
description = "Tools to process TLG image file."
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|||||||
Reference in New Issue
Block a user