From 4eb71a23a32037425482ffaa1eeb355405270252 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Mon, 29 Jan 2024 01:19:48 +0000 Subject: [PATCH] Fix GL.getSource bug introduced in #21184 (#21197) This only seems to show up in `browser.test_sdl_ogl_regal`. --- src/library_webgl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library_webgl.js b/src/library_webgl.js index c4c507255a2c3..746cc7a415596 100644 --- a/src/library_webgl.js +++ b/src/library_webgl.js @@ -425,7 +425,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}}; getSource: (shader, count, string, length) => { var source = ''; for (var i = 0; i < count; ++i) { - var len = length ? {{{ makeGetValue('length', 'i*' * POINTER_SIZE, '*') }}} : undefined; + var len = length ? {{{ makeGetValue('length', 'i*' + POINTER_SIZE, '*') }}} : undefined; source += UTF8ToString({{{ makeGetValue('string', 'i*' + POINTER_SIZE, '*') }}}, len); } #if LEGACY_GL_EMULATION