Adapted to Mingw. Still some elements must adapted.

git-svn-id: https://clonekeenplus.svn.sourceforge.net/svnroot/clonekeenplus/cgenius/trunk@167 4df4b0f3-56ce-47cb-b001-ed939b7d65a6
This commit is contained in:
gerstrong
2009-07-25 16:27:11 +00:00
parent 476a64065b
commit 406e29984f
8 changed files with 14 additions and 24 deletions

View File

@@ -55,7 +55,7 @@ void CPatcher::patchMemory()
TrimSpaces(newbuf);
size_t p = newbuf.find(' ');
if(p != std::string::npos) {
size_t offset = 0;
long offset = 0;
sscanf(newbuf.substr(0,p).c_str(), "%lx", &offset); // Only hexadecimal numbers supported
std::string patch_file_name = newbuf.substr(p+1);
TrimSpaces(patch_file_name);
@@ -125,7 +125,7 @@ bool CPatcher::loadPatchfile()
return true;
}
void CPatcher::patchMemfromFile(const std::string& patch_file_name, int offset)
void CPatcher::patchMemfromFile(const std::string& patch_file_name, long offset)
{
unsigned char *buf_to_patch;
unsigned char byte;

View File

@@ -17,7 +17,7 @@ public:
virtual ~CPatcher();
void patchMemory();
void patchMemfromFile(const std::string& patch_file_name, int offset);
void patchMemfromFile(const std::string& patch_file_name, long offset);
private: