mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Patched medical extension
This commit is contained in:
parent
1f95c0f021
commit
aae0709772
@ -6,6 +6,8 @@
|
||||
*/
|
||||
|
||||
#include "shared.hpp"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
@ -31,13 +33,13 @@ std::vector<std::string> parseExtensionInput(const std::string& input)
|
||||
|
||||
void __stdcall RVExtension(char *output, int outputSize, const char *function) {
|
||||
if (!strcmp(function, "version")) {
|
||||
strncpy(output, ACE_FULL_VERSION_STR, outputSize);
|
||||
strncpy_s(output, outputSize, ACE_FULL_VERSION_STR, _TRUNCATE);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
std::string returnValue = "";
|
||||
std::vector<std::string> arguments = parseExtensionInput(function);
|
||||
if (arguments.size() > 0)
|
||||
if (arguments.size() > 0)
|
||||
{
|
||||
try {
|
||||
std::string command = arguments.at(0);
|
||||
@ -82,8 +84,7 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function) {
|
||||
returnValue = debugreturn.str();
|
||||
}
|
||||
}
|
||||
strncpy(output, returnValue.c_str(), outputSize);
|
||||
output[outputSize - 1] = '\0';
|
||||
|
||||
strncpy_s(output, outputSize, returnValue.c_str(), _TRUNCATE);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user