summaryrefslogtreecommitdiff
path: root/examples/quantize/quantize.cpp
diff options
context:
space:
mode:
authorCebtenzzre <cebtenzzre@gmail.com>2023-08-28 02:32:25 -0400
committerGitHub <noreply@github.com>2023-08-28 09:32:25 +0300
commitebcee207b6058b7f695bb5c203ad87b1066a9790 (patch)
tree0ed2f6b2aa4197693c4630a3f6c57c6a42f065c2 /examples/quantize/quantize.cpp
parent3e8ff47af620a31e0810c58a41e4b089145982ef (diff)
quantize : make output filename optional again (#2823)
* quantize : make output filename optional again * quantize : fix path parsing on Windows suggested by @slaren
Diffstat (limited to 'examples/quantize/quantize.cpp')
-rw-r--r--examples/quantize/quantize.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/quantize/quantize.cpp b/examples/quantize/quantize.cpp
index d172f645..df9a214f 100644
--- a/examples/quantize/quantize.cpp
+++ b/examples/quantize/quantize.cpp
@@ -100,7 +100,7 @@ int main(int argc, char ** argv) {
}
}
- if (argc - arg_idx < 3) {
+ if (argc - arg_idx < 2) {
usage(argv[0]);
}
@@ -114,7 +114,7 @@ int main(int argc, char ** argv) {
std::string ftype_str;
if (try_parse_ftype(argv[arg_idx], params.ftype, ftype_str)) {
std::string fpath;
- const size_t pos = fname_inp.find_last_of('/');
+ const size_t pos = fname_inp.find_last_of("/\\");
if (pos != std::string::npos) {
fpath = fname_inp.substr(0, pos + 1);
}