Fixed Null Error

This commit is contained in:
Twilight Suzuka 2006-02-11 00:41:28 +00:00
parent d548457c30
commit a93001a68b

View File

@ -34,45 +34,45 @@ int UTIL_PatchMemory(maddress baseaddress, maddress address, Type patch, char me
int UTIL_PatchMemory_Byte(maddress baseaddress, maddress address, char patch, char memType)
{
return UTIL_PatchMemory(baseaddress, address, (char)(NULL), memType, BYTE_BYTES, true);
return UTIL_PatchMemory(baseaddress, address, (char)patch, memType, BYTE_BYTES, true);
}
int UTIL_PatchMemory_Word(maddress baseaddress, maddress address, short patch, char memType)
{
return UTIL_PatchMemory(baseaddress, address, (short)(NULL), memType, WORD_BYTES, true);
return UTIL_PatchMemory(baseaddress, address, (short)patch, memType, WORD_BYTES, true);
}
int UTIL_PatchMemory_Dword(maddress baseaddress, maddress address, int32_t patch, char memType)
{
return UTIL_PatchMemory(baseaddress, address, (int32_t)(NULL), memType, DWORD_BYTES, true);
return UTIL_PatchMemory(baseaddress, address, (int32_t)patch, memType, DWORD_BYTES, true);
}
int UTIL_PatchMemory_Qword(maddress baseaddress, maddress address, long long patch, char memType)
{
return UTIL_PatchMemory(baseaddress, address, (long long)(NULL), memType, QWORD_BYTES, false);
return UTIL_PatchMemory(baseaddress, address, (long long)patch, memType, QWORD_BYTES, false);
}
int UTIL_PatchMemory_Float(maddress baseaddress, maddress address, float patch, char memType)
{
return UTIL_PatchMemory(baseaddress, address, (float)(NULL), memType, FLOAT_BYTES, false);
return UTIL_PatchMemory(baseaddress, address, (float)patch, memType, FLOAT_BYTES, false);
}
int UTIL_PatchMemory_UnsignedByte(maddress baseaddress, maddress address, unsigned char patch, char memType)
{
return UTIL_PatchMemory(baseaddress, address, (unsigned char)(NULL), memType, BYTE_BYTES, false);
return UTIL_PatchMemory(baseaddress, address, (unsigned char)patch, memType, BYTE_BYTES, false);
}
int UTIL_PatchMemory_UnsignedWord(maddress baseaddress, maddress address, unsigned short patch, char memType)
{
return UTIL_PatchMemory(baseaddress, address, (unsigned short)(NULL), memType, WORD_BYTES, false);
return UTIL_PatchMemory(baseaddress, address, (unsigned short)patch, memType, WORD_BYTES, false);
}
int UTIL_PatchMemory_UnsignedDword(maddress baseaddress, maddress address, uint32_t patch, char memType)
{
return UTIL_PatchMemory(baseaddress, address, (uint32_t)(NULL), memType, DWORD_BYTES, false);
return UTIL_PatchMemory(baseaddress, address, (uint32_t)patch, memType, DWORD_BYTES, false);
}
int UTIL_PatchMemory_Pointer(maddress baseaddress, maddress address, maddress patch, char memType)
{
return UTIL_PatchMemory(baseaddress, address, (maddress)(NULL), memType, DWORD_BYTES, true);
return UTIL_PatchMemory(baseaddress, address, (maddress)patch, memType, DWORD_BYTES, true);
}