Merge pull request #3300 from mahiuchun/strrchr

Use strrchr() when finding the '.' that begins the file extension.
pull/3321/head
Kim Kulling 2020-07-11 21:19:55 +02:00 committed by GitHub
commit 2cd1192bf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -376,7 +376,7 @@ int main(int argc, char **argv)
// Check and validate the specified model file extension.
model_file = argv[1];
const char* extension = strchr(model_file, '.');
const char* extension = strrchr(model_file, '.');
if (!extension) {
print_error("Please provide a file with a valid extension.");
return EXIT_FAILURE;