Add support for string returns (not fully tested)

This commit is contained in:
Dr!fter
2013-08-22 16:14:32 -04:00
parent 50b7eb0def
commit 6e40653db6
3 changed files with 98 additions and 9 deletions
+15 -1
View File
@@ -74,7 +74,21 @@ class HookReturnStruct
public:
~HookReturnStruct()
{
free(this->newResult);
if(this->type != ReturnType_CharPtr && this->type != ReturnType_StringPtr)
{
free(this->newResult);
}
else if(this->isChanged)
{
if(this->type != ReturnType_CharPtr)
{
delete *(char **)this->newResult;
}
else if(this->type != ReturnType_StringPtr)
{
delete *(string_t **)this->newResult;
}
}
free(this->orgResult);
}
public: