From a0a68282cdd6180ecc9ccd8c7455ab058922602a Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Sat, 12 Nov 2022 22:38:10 +0100 Subject: [PATCH] src/main: simplify svf type search --- src/main.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 03efc8d..f0d3788 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -498,9 +498,7 @@ int main(int argc, char **argv) jtag->device_select(index); /* detect svf file and program the device */ - if (!args.bit_file.empty() && - ((!args.file_type.empty() && args.file_type == "svf") || - (args.bit_file.substr(args.bit_file.find_last_of(".") + 1) == "svf"))) { + if (!args.file_type.compare("svf") || args.bit_file.find(".svf") >= 0) { SVF_jtag *svf = new SVF_jtag(jtag, args.verbose); try { svf->parse(args.bit_file);