Skip to content

Commit

Permalink
Allow locations specified in hex (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfharden authored Jan 29, 2024
1 parent 7a89c29 commit 75c67d1
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
27 changes: 26 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[package]
name = "bridgeboard-pc-boot-patcher"
version = "0.1.0"
version = "0.1.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
clap = { version = "^4.4", features = ["derive"] }
clap-num = "1"

[dev-dependencies]
md5 = "0.7"
Expand Down
3 changes: 2 additions & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use clap::{Parser, Subcommand, Args};
use clap_num::maybe_hex;

#[derive(Parser)]
#[command(author, version)]
Expand Down Expand Up @@ -28,7 +29,7 @@ pub struct SourceArgs {
pub source_path: std::path::PathBuf,

/// ROM location in the file (in hex if specified with a leading 0x)
#[arg(short, long, conflicts_with = "scan")]
#[arg(short, long, conflicts_with = "scan", value_parser=maybe_hex::<usize>)]
pub location: Option<usize>,

/// Scan in the source file for an Option Rom
Expand Down

0 comments on commit 75c67d1

Please sign in to comment.