mirror of
https://github.com/encounter/aurora.git
synced 2025-07-05 04:35:55 +00:00
Fix fragmentation handling
This commit is contained in:
parent
cde5331ac4
commit
f79ef4cef3
@ -105,11 +105,11 @@ void Card::write(FileHandle* f, const void* buf, size_t size)
|
||||
f->file->m_modifiedTime = getGCTime();
|
||||
if (f->blockOffset > BlockSize)
|
||||
{
|
||||
f->curBlock = m_currentBat->m_map[f->curBlock - FSTBlocks];
|
||||
f->blockOffset = 0;
|
||||
/* TODO: Add error */
|
||||
if (f->curBlock == 0xFFFF)
|
||||
return;
|
||||
|
||||
f->curBlock = m_currentBat->m_map[f->curBlock];
|
||||
}
|
||||
size_t blockOffset = (f->curBlock * BlockSize) + f->offset;
|
||||
fseek(mc, blockOffset, SEEK_SET);
|
||||
|
Loading…
x
Reference in New Issue
Block a user