Rev 59 | Rev 116 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 59 | Rev 81 | ||
|---|---|---|---|
| Line 371... | Line 371... | ||
| 371 | else if (wcsncmp (line_buffer, L"Last disconnected: ", 19) == 0) |
371 | else if (wcsncmp (line_buffer, L"Last disconnected: ", 19) == 0) |
| 372 | { |
372 | { |
| 373 | field_start = &line_buffer[19]; // skip the "Last disconnected: " text |
373 | field_start = &line_buffer[19]; // skip the "Last disconnected: " text |
| 374 | 374 | ||
| 375 | // read and convert the data in the right form |
375 | // read and convert the data in the right form |
| 376 | if (swscanf_s (field_start, L"%*s %s %d, %*d:%*d %*s %d", month_str, WCHAR_SIZEOF (month_str), & |
376 | if (swscanf_s (field_start, L"%*s %s %d, %*d:%*d %*s %d", month_str, WCHAR_SIZEOF (month_str), &days, &number) == 3) |
| - | 377 | { |
|
| - | 378 | playercard->disconnection_day = days; // reuse the "days" variable, which is an int, and we need an int in swscanf_s() |
|
| 377 | playercard->disconnection_month = MonthStringToNumber (month_str); // convert month from string to number |
379 | playercard->disconnection_month = MonthStringToNumber (month_str); // convert month from string to number |
| - | 380 | playercard->disconnection_year = number; // reuse the "number" variable, which is an int, and we need an int in swscanf_s() |
|
| - | 381 | } |
|
| 378 | 382 | ||
| 379 | playercard->update_dialog = true; // remember to update dialog |
383 | playercard->update_dialog = true; // remember to update dialog |
| 380 | } |
384 | } |
| 381 | 385 | ||
| 382 | // else player has never connected |
386 | // else player has never connected |