Skip to content

Commit

Permalink
Don't store -1 into unsigned value.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Apr 18, 2024
1 parent 29f1d12 commit 7cb70ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_store_into.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ TEST_CASE("Test store_into(uint8_t), default value, non specified" *
TEST_CASE("Test store_into(uint8_t), default value, specified" *
test_suite("store_into")) {
argparse::ArgumentParser program("test");
uint8_t res = -1;
uint8_t res = 55;
program.add_argument("--int-opt").default_value((uint8_t)3).store_into(res);

program.parse_args({"./test.exe", "--int-opt", "5"});
Expand Down

0 comments on commit 7cb70ed

Please sign in to comment.