mirror of
https://github.com/thunderbrewhq/bc.git
synced 2025-12-12 10:02:30 +00:00
fix(file): where recursive CreateDirectory under Windows always reports an out-of-bounds error for no reason
This commit is contained in:
parent
e813ad0672
commit
4b14419350
1 changed files with 1 additions and 1 deletions
|
|
@ -504,7 +504,7 @@ bool CreateDirectory(FileParms* parms) {
|
|||
s++;
|
||||
}
|
||||
|
||||
if (Blizzard::String::Copy(leadingpath, path, std::min(static_cast<int32_t>(s - path) + 2, MAX_PATH))) {
|
||||
if (Blizzard::String::Copy(leadingpath, path, std::min(static_cast<int32_t>(s - path) + 2, MAX_PATH)) >= MAX_PATH) {
|
||||
BC_FILE_SET_ERROR(8);
|
||||
if (path != pathbuffer) {
|
||||
delete path;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue