diff options
author | David Robillard <d@drobilla.net> | 2023-02-04 19:25:22 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-02-04 19:25:22 -0500 |
commit | 5a9787b4247c6735cc3213944945e8983002edf9 (patch) | |
tree | 635a8711a53b9e50d7dcd24dc4acefefce694c3d /src/path.c | |
parent | c4b3814edad510c6c124089822bd5506f9334411 (diff) | |
download | zix-5a9787b4247c6735cc3213944945e8983002edf9.tar.gz zix-5a9787b4247c6735cc3213944945e8983002edf9.tar.bz2 zix-5a9787b4247c6735cc3213944945e8983002edf9.zip |
Suppress/fix clang-tidy warnings on Windows
Diffstat (limited to 'src/path.c')
-rw-r--r-- | src/path.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -182,6 +182,10 @@ ZIX_PURE_FUNC static ZixIndexRange zix_path_filename_range(const ZixStringView path) { + if (!path.length) { + return zix_make_range(0, 0); + } + // Find the first filename character (skip leading root path if any) const size_t begin = zix_path_root_path_range(path.data).end; if (begin == path.length || is_dir_sep(path.data[path.length - 1U])) { |