- Fixed compile errors in adduser.c and ladmin.c under win platforms.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6553 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
03ac2b977e
commit
aa09f1ddd5
@ -3295,9 +3295,7 @@ int parse_fromlogin(int fd) {
|
|||||||
if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
|
if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
|
||||||
return 0;
|
return 0;
|
||||||
{
|
{
|
||||||
char md5str[64] = "", md5bin[32], md5key[RFIFOW(fd,2) - 4 + 1];
|
char md5str[64] = "", md5bin[32];
|
||||||
memcpy(md5key, RFIFOP(fd,4), RFIFOW(fd,2) - 4);
|
|
||||||
md5key[sizeof(md5key)-1] = '0';
|
|
||||||
if (passenc == 1) {
|
if (passenc == 1) {
|
||||||
strncpy(md5str, (const char*)RFIFOP(fd,4), RFIFOW(fd,2) - 4);
|
strncpy(md5str, (const char*)RFIFOP(fd,4), RFIFOW(fd,2) - 4);
|
||||||
strcat(md5str, loginserveradminpassword);
|
strcat(md5str, loginserveradminpassword);
|
||||||
|
@ -37,10 +37,11 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
int next_id, id;
|
int next_id, id;
|
||||||
char line[1024];
|
char line[1024];
|
||||||
|
FILE *FPaccin,*FPaccout;
|
||||||
|
|
||||||
// Check to see if account.txt exists.
|
// Check to see if account.txt exists.
|
||||||
printf("Checking if '%s' file exists...\n", account_txt);
|
printf("Checking if '%s' file exists...\n", account_txt);
|
||||||
FILE *FPaccin = fopen(account_txt, "r");
|
FPaccin = fopen(account_txt, "r");
|
||||||
if (FPaccin == NULL) {
|
if (FPaccin == NULL) {
|
||||||
printf("'%s' file not found!\n", account_txt);
|
printf("'%s' file not found!\n", account_txt);
|
||||||
printf("Run the setup wizard please.\n");
|
printf("Run the setup wizard please.\n");
|
||||||
@ -90,7 +91,7 @@ int main(int argc, char *argv[]) {
|
|||||||
scanf("%s", &sex);
|
scanf("%s", &sex);
|
||||||
}
|
}
|
||||||
|
|
||||||
FILE *FPaccout = fopen(account_txt, "r+");
|
FPaccout = fopen(account_txt, "r+");
|
||||||
fseek(FPaccout, 0, SEEK_END);
|
fseek(FPaccout, 0, SEEK_END);
|
||||||
fprintf(FPaccout, "%i %s %s - %s -\r\n", next_id, username, password, sex);
|
fprintf(FPaccout, "%i %s %s - %s -\r\n", next_id, username, password, sex);
|
||||||
close(FPaccout);
|
close(FPaccout);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user