Handmade Hero»Forums»Code
Marius Adaškevičius
22 posts
Day 286: Potential typo in PackEntityIntoChunk
I think there is a bug in PackEntityIntoChunk where entity reference arrays are not packed into correct location. The call site (handmade_world.cpp:264) is probably missing parentheses around Source + 1:
1
2
PackEntityReferenceArray(Source->PairedEntityCount, Source->PairedEntities, 
                         (stored_entity_reference *)Source + 1);
Casey Muratori
801 posts / 1 project
Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.
Day 286: Potential typo in PackEntityIntoChunk
Yep. Although I realized after the stream that this is probably not what we want to do anyway, so we may delete this line before fixing it :)

- Casey