Skip to content

Commit c16ebaa

Browse files
committed
submodule: replace index with strchr which exists on Windows
1 parent 91a4849 commit c16ebaa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/submodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ int git_submodule_name_is_valid(git_repository *repo, const char *name, int flag
374374
flags = GIT_PATH_REJECT_FILESYSTEM_DEFAULTS;
375375

376376
/* Avoid allocating a new string if we can avoid it */
377-
if (index(name, '\\')) {
377+
if (strchr(name, '\\') != NULL) {
378378
if ((error = git_path_normalize_slashes(&buf, name)) < 0)
379379
return error;
380380
} else {

0 commit comments

Comments
 (0)