1
0
mirror of https://github.com/pumpitupdev/pumptools.git synced 2024-11-23 22:50:56 +01:00

wip add file dumping for profiles to debug pumpnet downloads

This commit is contained in:
icex2 2021-05-09 18:43:53 +02:00
parent 873c9fb6f5
commit 756cfbccbd

View File

@ -478,6 +478,23 @@ static bool _patch_net_profile_download_profile_file(
"Downloading file player %d, file_type %d, successful",
player,
file_type);
FILE* out;
if (file_type == PUMPNET_LIB_FILE_TYPE_SAVE) {
out = fopen("/tmp/save_dump.bin", "w+");
} else {
out = fopen("/tmp/rank_dump.bin", "w+");
}
if (!out) {
log_error("Cannot open file for dumping");
return true;
}
fwrite(virtual_file->buffer, virtual_file->file_info->file_size, 1, out);
fclose(out);
return true;
}