mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #3552 from novichiv/master
Fixed strncpy in parse_imagepath
This commit is contained in:
commit
75f2ccf33c
@ -36,18 +36,17 @@ std::string getImagePathFromStructuredText(const std::string & input) {
|
|||||||
return returnValue;
|
return returnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// i like to live dangerously. jk, fix strncpy sometime pls.
|
|
||||||
#pragma warning( push )
|
#pragma warning( push )
|
||||||
#pragma warning( disable : 4996 )
|
#pragma warning( disable : 4996 )
|
||||||
|
|
||||||
void __stdcall RVExtension(char *output, int outputSize, const char *function) {
|
void __stdcall RVExtension(char *output, int outputSize, const char *function) {
|
||||||
ZERO_OUTPUT();
|
ZERO_OUTPUT();
|
||||||
if (!strcmp(function, "version")) {
|
if (!strcmp(function, "version")) {
|
||||||
strncpy(output, ACE_FULL_VERSION_STR, outputSize);
|
strncpy_s(output, outputSize, ACE_FULL_VERSION_STR, _TRUNCATE);
|
||||||
} else {
|
} else {
|
||||||
strncpy(output, getImagePathFromStructuredText(function).c_str(), outputSize);
|
strncpy_s(output, outputSize, getImagePathFromStructuredText(function).c_str(), _TRUNCATE);
|
||||||
output[outputSize - 1] = '\0';
|
output[outputSize - 1] = '\0';
|
||||||
}
|
}
|
||||||
EXTENSION_RETURN();
|
EXTENSION_RETURN();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user