Skip to content

Commit 42146b2

Browse files
committed
rename heapedIndex -> textFormatBufferIndex
1 parent 9f24f06 commit 42146b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

raylib.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class RaylibJs {
4747
this.currentMousePosition = {x: 0, y: 0};
4848
this.images = [];
4949
this.quit = false;
50-
this.heapedIndex = 0;
50+
this.textFormatBufferIndex = 0;
5151
}
5252

5353
constructor() {
@@ -209,7 +209,7 @@ class RaylibJs {
209209
const heap_base = this.wasm.instance.exports.__heap_base.value;
210210
// TODO: Check if the values exceeds the heap end
211211
// const heap_end = this.wasm.instance.exports.__heap_end.value;
212-
const heap_ptr = heap_base + this.heapedIndex * MAX_TEXT_BUFFER_LENGTH;
212+
const heap_ptr = heap_base + this.textFormatBufferIndex * MAX_TEXT_BUFFER_LENGTH;
213213

214214
// Inserting "..." at the end of the string to mark as truncated
215215
if (fmt_text_len >= MAX_TEXT_BUFFER_LENGTH) {
@@ -226,8 +226,8 @@ class RaylibJs {
226226

227227
// Mark end with null
228228
bytes[fmt_text.length] = 0;
229-
this.heapedIndex += 1;
230-
if (this.heapedIndex >= MAX_TEXTFORMAT_BUFFERS) this.heapedIndex = 0;
229+
this.textFormatBufferIndex += 1;
230+
if (this.textFormatBufferIndex >= MAX_TEXTFORMAT_BUFFERS) this.textFormatBufferIndex = 0;
231231

232232
return heap_ptr;
233233
}

0 commit comments

Comments
 (0)