diff options
author | Fox Caminiti <fox@foxcam.net> | 2022-11-24 01:16:54 -0500 |
---|---|---|
committer | Fox Caminiti <fox@foxcam.net> | 2022-11-24 01:16:54 -0500 |
commit | 17bee519ece8fc2bc356956841fed97286d24139 (patch) | |
tree | dd09d56fdd7e1d1fca58cbc345414bdfba9c19a6 /memory.cpp | |
parent | fd315f15828b8537a48530c094ced845edc3a1d3 (diff) |
legwork
Diffstat (limited to 'memory.cpp')
-rw-r--r-- | memory.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -106,10 +106,10 @@ static uint32 Memory_Block_PrincipalBitmap_AllocateNew(project_data *File, project_state *State, memory *Memory) { int h = 0, c = 0, i = 0; - int MaxBlockIndex = 0; + int MaxBlockIndex = -1; while (Block_Loop(Memory, F_Sources, File->Source_Count, &h, &c, &i)) { block_source *Source = (block_source *)Memory_Block_AddressAtIndex(Memory, F_Sources, i); - if (Source->Bitmap_Index > MaxBlockIndex) + if (Source->Bitmap_Index > MaxBlockIndex && Source->Type == source_type_principal) MaxBlockIndex = i; } |