Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cxong/tinydir.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLautis Sun <lautis0503@gmail.com>2016-09-07 19:22:02 +0300
committerGitHub <noreply@github.com>2016-09-07 19:22:02 +0300
commit637c79edd341247cbf7f84b90da34b8920f3851f (patch)
treedf6a12a9c3cff1bf6d7a04d86aa31780d3438c6f
parentd4d5eb2d07762457096f602d8fa2ffaa81397b10 (diff)
Make dir_name_buf no longer than _TINYDIR_FILENAME_MAX
Like the previous commit, _splitpath_s may not work fine with too long buffer of parameters. Refer to https://msdn.microsoft.com/en-us/library/8e46eyt7.aspx#Anchor_3
-rw-r--r--tinydir.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tinydir.h b/tinydir.h
index bc6c2bb..156c593 100644
--- a/tinydir.h
+++ b/tinydir.h
@@ -639,7 +639,7 @@ int tinydir_file_open(tinydir_file *file, const _tinydir_char_t *path)
_tsplitpath_s(
path,
drive_buf, _TINYDIR_DRIVE_MAX,
- dir_name_buf, _TINYDIR_PATH_MAX,
+ dir_name_buf, _TINYDIR_FILENAME_MAX,
file_name_buf, _TINYDIR_FILENAME_MAX,
ext_buf, sizeof _TINYDIR_FILENAME_MAX);
#else