Skip to content

Commit

Permalink
use %
Browse files Browse the repository at this point in the history
  • Loading branch information
VICTORVICKIE committed Feb 23, 2024
1 parent 42146b2 commit faa6854
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions raylib.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,9 @@ class RaylibJs {

// Mark end with null
bytes[fmt_text.length] = 0;
this.textFormatBufferIndex += 1;
if (this.textFormatBufferIndex >= MAX_TEXTFORMAT_BUFFERS) this.textFormatBufferIndex = 0;

// Move to next buffer for next function call
this.textFormatBufferIndex = (this.textFormatBufferIndex + 1) % MAX_TEXTFORMAT_BUFFERS;

return heap_ptr;
}
Expand Down

0 comments on commit faa6854

Please sign in to comment.