Handmade Hero»Forums»Code
Jez
3 posts
Transient initialization bugs?
It appears there's a couple of bugs in the transient initialization code which is causing (at least) my version of handmade to crash (both days 85 & 86).
1
transient_state *TranState = (transient_state *)Memory->TransientStorageSize;

Should be:
1
transient_state *TranState = (transient_state *)Memory->TransientStorage;

And:
1
InitializeArena(&TranState->TranArena, Memory->TransientStorageSize - sizeof(transient_state), (uint8 *)Memory->TransientStorageSize + sizeof(transient_state));

Should be:
1
InitializeArena(&TranState->TranArena, Memory->TransientStorageSize - sizeof(transient_state), (uint8 *)Memory->TransientStorage + sizeof(transient_state));
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.
Transient initialization bugs?
Thanks Jez - if that's in there, that was just really bad typing on my part :) I'll check it out on the stream tonight!

- Casey