Skip to content

Commit

Permalink
Forgot to reset the scratch space to 0 (#267)
Browse files Browse the repository at this point in the history
Co-authored-by: Karim Ahmed <kariemmohamed@savance.com>
  • Loading branch information
kariem2k and kariem2k committed Aug 24, 2021
1 parent f4b5dcc commit 2daadfc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cute_spritebatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,7 @@ int spritebatch_init(spritebatch_t* sb, spritebatch_config_t* config, void* udat
sb->sprite_capacity = 1024;
sb->sprites = (spritebatch_sprite_t*)SPRITEBATCH_MALLOC(sizeof(spritebatch_sprite_t) * sb->sprite_capacity, sb->mem_ctx);

sb->sprites_scratch = 0;
if (sprite_batch_internal_use_scratch_buffer(sb))
{
sb->sprites_scratch = (spritebatch_sprite_t*)SPRITEBATCH_MALLOC(sizeof(spritebatch_sprite_t) * sb->sprite_capacity, sb->mem_ctx);
Expand Down

0 comments on commit 2daadfc

Please sign in to comment.