From 52354bf382627b04627eb9047714950daf601ab7 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Sun, 9 Jun 2013 18:17:47 +0200 Subject: [PATCH] Added missing ramp array allocation. --- src/win32_gamma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/win32_gamma.c b/src/win32_gamma.c index 3ece6da0..05a65826 100644 --- a/src/win32_gamma.c +++ b/src/win32_gamma.c @@ -50,11 +50,11 @@ void _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp) GetDeviceGammaRamp(dc, values); DeleteDC(dc); + _glfwAllocGammaRamp(ramp, 256); + memcpy(ramp->red, values + 0, 256 * sizeof(unsigned short)); memcpy(ramp->green, values + 256, 256 * sizeof(unsigned short)); memcpy(ramp->blue, values + 512, 256 * sizeof(unsigned short)); - - ramp->size = 256; } void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)