summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorEdward O'Callaghan <[email protected]>2017-03-17 16:24:06 +1100
committerEdward O'Callaghan <[email protected]>2017-04-02 15:18:38 +1000
commitf9387a223d40bb8d108a539671e0291cc25c6d80 (patch)
tree5ba0479d08eb7f6534a22c05fb7d6add61b6e77b /src/mesa/main
parent515165ff0e5f0674d79a2a4ea2904a609d521346 (diff)
mesa/main: Fix memset in formatquery.c
v2: We explicitly set each member to -1 over using a confusing memset(). Signed-off-by: Edward O'Callaghan <[email protected]> Reviewed-by: Alejandro PiƱeiro <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/formatquery.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c
index 598d34d3476..07fb2f2330f 100644
--- a/src/mesa/main/formatquery.c
+++ b/src/mesa/main/formatquery.c
@@ -1564,7 +1564,8 @@ _mesa_GetInternalformati64v(GLenum target, GLenum internalformat,
* no pname can return a negative value, we fill params32 with negative
* values as reference values, that can be used to know what copy-back to
* params */
- memset(params32, -1, 16);
+ for (i = 0; i < realSize; i++)
+ params32[i] = -1;
/* For GL_MAX_COMBINED_DIMENSIONS we need to get back 2 32-bit integers,
* and at the same time we only need 2. So for that pname, we call the