strmid writing to wrong varible
#1

Code:

Код:
RandomString(SafeData[playerid][eSalt], ACCOUNT_MAX_SALT_SIZE);
printf("1) salt = %s", SafeData[playerid][eSalt]);
SHA256_PassHash(password, SafeData[playerid][eSalt], password_hash, sizeof(password_hash));
strmid(SafeData[playerid][ePassword], password_hash, 0, strlen(password_hash), ACCOUNT_MAX_PASSWORD_SIZE);

					
printf("2) salt = %s", SafeData[playerid][eSalt]);
strmid(SafeData[playerid][eEmail], email, 0, strlen(email), ACCOUNT_MAX_EMAIL_SIZE);
printf("3) salt = %s", SafeData[playerid][eSalt]);
Printf output:

Код:
1) salt = H2422186RrsL1lUK8fj55TH01oIOSkfZ29WbBf589p440tXoz9M6DZz72n9M2k2597mq437m
2) salt = H2422186RrsL1lUK8fj55TH01oIOSkfZ29WbBf589p440tXoz9M6DZz72n9M2k2597mq437m
3) salt = H2422186RrsL1lUK8fj55TH01oIOSkfZ29WbBf589p440tXoz9M6DZz72n9M2k2597mq437mtestemail123@gmail.com
So my SafeData[playerid][eSalt] is getting messed up after strmid wrote to SafeData[playerid][eEmail] variable ... any idea why?
Reply


Messages In This Thread
strmid writing to wrong varible - by wallee - 06.09.2017, 05:10
Re: strmid writing to wrong varible - by nG Inverse - 06.09.2017, 05:43
Re: strmid writing to wrong varible - by wallee - 06.09.2017, 07:13
Re: strmid writing to wrong varible - by Vince - 06.09.2017, 08:25
Re: strmid writing to wrong varible - by Misiur - 06.09.2017, 08:32
Re: strmid writing to wrong varible - by wallee - 06.09.2017, 20:13
Re: strmid writing to wrong varible - by wallee - 07.09.2017, 02:31
Re: strmid writing to wrong varible - by Paulice - 07.09.2017, 04:17
Re: strmid writing to wrong varible - by wallee - 07.09.2017, 19:21

Forum Jump:


Users browsing this thread: 3 Guest(s)