 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
jackyyll Expert Cheater
Reputation: 0
Joined: 28 Jan 2008 Posts: 143 Location: here
|
Posted: Fri Jun 26, 2009 11:00 am Post subject: 32bit to 64bit C++ |
|
|
Well, i coded my shit for 32bit and now i'm trying to compile it on a 64bit linux system and i'm getting some errors:
| Code: |
Utilities.cpp: In function ‘void encrypt_password(char*, char*)’:
Utilities.cpp:98: error: cast from ‘unsigned char*’ to ‘int’ loses precision
Utilities.cpp:98: error: cast from ‘unsigned char*’ to ‘int’ loses precision
|
How do i fix this? :S
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25820 Location: The netherlands
|
Posted: Fri Jun 26, 2009 12:11 pm Post subject: |
|
|
I think there should be a compile parameter to be less string, and to handle it just as a warning.
anyhow, what is the code at line 98 ?
int xxx;
unsigned char *c;
...c gets set...
xxx=c;
if so, try explicitly telling the compiler you WANT to do it:
xxx=(int)c;
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
jackyyll Expert Cheater
Reputation: 0
Joined: 28 Jan 2008 Posts: 143 Location: here
|
Posted: Fri Jun 26, 2009 3:23 pm Post subject: |
|
|
| Code: | void encrypt_password( char *outbuffer, char *password )
{
unsigned char buffer[] = {
0x00, 0x5D, 0x1E, 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x55, 0xA5, 0x71, 0x00, 0x00, 0x00, 0x00
};
memcpy( ( void * )buffer, ( void * )password, ( strlen( password ) + 1 ) );
_encrypt_password( (int)rc5_cipher, (int)buffer, 16 );
memcpy( ( void * )outbuffer, ( void * )buffer, 16 );
} |
That' the function that throws the error.
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25820 Location: The netherlands
|
Posted: Fri Jun 26, 2009 4:22 pm Post subject: |
|
|
Not sure what the function declaration of _encrypt_password is but try:
_encrypt_password( (unsigned long long)rc5_cipher, (unsigned long long)buffer, 16 );
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Jani Grandmaster Cheater
Reputation: 2
Joined: 29 Dec 2006 Posts: 804
|
Posted: Sun Jun 28, 2009 9:12 am Post subject: |
|
|
| Dark Byte wrote: | | Not sure what the function declaration of _encrypt_password | I'd assume they're pointers(?): | Code: | | _encrypt_password( (void*)rc5_cipher, (void*)buffer, 16 ); |
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|