Skip to content

Commit 28dd111

Browse files
committed
fix: fix unexpected parameter format.
1 parent 50bf20b commit 28dd111

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ int main(int argc, char** argv) try {
1818

1919
// clang-format off
2020

21-
argparse::ArgumentParser program("rkcfgtool", "0.1.0");
21+
argparse::ArgumentParser program("rkcfgtool", "0.2.0");
2222

2323
program.add_argument("-i", "--input")
2424
.help("Import a file.")

src/rockchip/RKCfg.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ RKCfgFile::fromParameter(const std::string& path, AutoScanArgument auto_scan_arg
6464
// "mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),...,0x00400000@0x00E3a000(userdata),-@0x0123a000(userdisk:grow)"
6565
std::string mtdparts;
6666
while (std::getline(file, mtdparts)) {
67-
if (mtdparts.starts_with("CMDLINE: "))
68-
if (mtdparts.starts_with("mtdparts=")) break;
67+
if (mtdparts.starts_with("CMDLINE: ")) util::string::remove_prefix(mtdparts, "CMDLINE: ");
68+
if (mtdparts.starts_with("mtdparts=")) break;
6969
}
7070
spdlog::debug("mtdparts: {}", mtdparts);
7171
if (mtdparts.empty()) {

0 commit comments

Comments
 (0)