Skip to content

Commit faa6854

Browse files
committed
use %
1 parent 42146b2 commit faa6854

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

raylib.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,9 @@ class RaylibJs {
226226

227227
// Mark end with null
228228
bytes[fmt_text.length] = 0;
229-
this.textFormatBufferIndex += 1;
230-
if (this.textFormatBufferIndex >= MAX_TEXTFORMAT_BUFFERS) this.textFormatBufferIndex = 0;
229+
230+
// Move to next buffer for next function call
231+
this.textFormatBufferIndex = (this.textFormatBufferIndex + 1) % MAX_TEXTFORMAT_BUFFERS;
231232

232233
return heap_ptr;
233234
}

0 commit comments

Comments
 (0)