Skip to content

Commit 71a97af

Browse files
cebtenzzrepull[bot]
authored andcommitted
quantize : make output filename optional again (#2823)
* quantize : make output filename optional again * quantize : fix path parsing on Windows suggested by @slaren
1 parent 13ce9a7 commit 71a97af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/quantize/quantize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ int main(int argc, char ** argv) {
100100
}
101101
}
102102

103-
if (argc - arg_idx < 3) {
103+
if (argc - arg_idx < 2) {
104104
usage(argv[0]);
105105
}
106106

@@ -114,7 +114,7 @@ int main(int argc, char ** argv) {
114114
std::string ftype_str;
115115
if (try_parse_ftype(argv[arg_idx], params.ftype, ftype_str)) {
116116
std::string fpath;
117-
const size_t pos = fname_inp.find_last_of('/');
117+
const size_t pos = fname_inp.find_last_of("/\\");
118118
if (pos != std::string::npos) {
119119
fpath = fname_inp.substr(0, pos + 1);
120120
}

0 commit comments

Comments
 (0)