Open tay10r opened 7 months ago
https://github.com/CodexLabsLLC/Colosseum/blob/2383b0adfc674d34e68cb05ef163ca1c00479352/AirLib/src/common/common_utils/FileSystem.cpp#L105
The third parameter expresses the buffer being larger than it actually is, since the size of wchar_t is greater than 1.
wchar_t
The function documentation is here.
https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getmodulefilenamea
The docs mention that the third parameter is the size of the buffer in terms of TCHARS. Which means that it is more of an element count, than a byte count. I believe it should be set to MAX_PATH.
TCHARS
MAX_PATH
https://github.com/CodexLabsLLC/Colosseum/blob/2383b0adfc674d34e68cb05ef163ca1c00479352/AirLib/src/common/common_utils/FileSystem.cpp#L105
The third parameter expresses the buffer being larger than it actually is, since the size of
wchar_t
is greater than 1.The function documentation is here.
https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getmodulefilenamea
The docs mention that the third parameter is the size of the buffer in terms of
TCHARS
. Which means that it is more of an element count, than a byte count. I believe it should be set toMAX_PATH
.