Commit 728cd484 authored by Jeremy Roman's avatar Jeremy Roman Committed by Commit Bot

Right-size the bool array in WebGLRenderingContextBase::getUniform.

There can only be four (as evidenced by the GLint array it is populated from).

Change-Id: I1bcbf4197c520bcdc02d553d1fb3c3f7bf9b428b
Reviewed-on: https://chromium-review.googlesource.com/c/1301956Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603144}
parent d6d58930
...@@ -3852,7 +3852,7 @@ ScriptValue WebGLRenderingContextBase::getUniform( ...@@ -3852,7 +3852,7 @@ ScriptValue WebGLRenderingContextBase::getUniform(
GLint value[4] = {0}; GLint value[4] = {0};
ContextGL()->GetUniformiv(ObjectOrZero(program), location, value); ContextGL()->GetUniformiv(ObjectOrZero(program), location, value);
if (length > 1) { if (length > 1) {
bool bool_value[16] = {0}; bool bool_value[4] = {0};
for (unsigned j = 0; j < length; j++) for (unsigned j = 0; j < length; j++)
bool_value[j] = static_cast<bool>(value[j]); bool_value[j] = static_cast<bool>(value[j]);
return WebGLAny(script_state, bool_value, length); return WebGLAny(script_state, bool_value, length);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment