mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-25 16:42:39 -06:00
CFGU: Use an absolute offset in the config savefile blocks
This commit is contained in:
parent
95ca6ae1e1
commit
b3d1c8ba6a
1 changed files with 3 additions and 1 deletions
|
@ -184,7 +184,7 @@ ResultCode GetConfigInfoBlock(u32 block_id, u32 size, u32 flag, u8* output) {
|
||||||
if (itr->size <= 4)
|
if (itr->size <= 4)
|
||||||
memcpy(output, &itr->offset_or_data, itr->size);
|
memcpy(output, &itr->offset_or_data, itr->size);
|
||||||
else
|
else
|
||||||
memcpy(output, &cfg_config_file_buffer[config->data_entries_offset + itr->offset_or_data], itr->size);
|
memcpy(output, &cfg_config_file_buffer[itr->offset_or_data], itr->size);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -219,6 +219,8 @@ ResultCode CreateConfigInfoBlk(u32 block_id, u32 size, u32 flags, u8 const* data
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
offset += config->data_entries_offset;
|
||||||
|
|
||||||
config->block_entries[config->total_entries].offset_or_data = offset;
|
config->block_entries[config->total_entries].offset_or_data = offset;
|
||||||
|
|
||||||
// Write the data at the new offset
|
// Write the data at the new offset
|
||||||
|
|
Loading…
Reference in a new issue