From 988e5371fac894a6b35e561fc43e5e9ea6bc3c40 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 8 Jan 2011 12:22:16 +0000 Subject: [PATCH] fix for crash when converting sequencer profiles with non-float buffers. --- source/blender/imbuf/intern/divers.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index 138212a622d..1ea11432025 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -278,9 +278,9 @@ void IMB_convert_profile(struct ImBuf *ibuf, int profile) } if(ibuf->rect) { for (i = ibuf->x * ibuf->y; i > 0; i--, rct+=4) { - rctf[0]= (unsigned char)((srgb_to_linearrgb((float)rctf[0]/255.0f) * 255.0f) + 0.5f); - rctf[1]= (unsigned char)((srgb_to_linearrgb((float)rctf[1]/255.0f) * 255.0f) + 0.5f); - rctf[2]= (unsigned char)((srgb_to_linearrgb((float)rctf[2]/255.0f) * 255.0f) + 0.5f); + rct[0]= (unsigned char)((srgb_to_linearrgb((float)rct[0]/255.0f) * 255.0f) + 0.5f); + rct[1]= (unsigned char)((srgb_to_linearrgb((float)rct[1]/255.0f) * 255.0f) + 0.5f); + rct[2]= (unsigned char)((srgb_to_linearrgb((float)rct[2]/255.0f) * 255.0f) + 0.5f); } } ok= TRUE; @@ -297,9 +297,9 @@ void IMB_convert_profile(struct ImBuf *ibuf, int profile) } if(ibuf->rect) { for (i = ibuf->x * ibuf->y; i > 0; i--, rct+=4) { - rctf[0]= (unsigned char)((linearrgb_to_srgb((float)rctf[0]/255.0f) * 255.0f) + 0.5f); - rctf[1]= (unsigned char)((linearrgb_to_srgb((float)rctf[1]/255.0f) * 255.0f) + 0.5f); - rctf[2]= (unsigned char)((linearrgb_to_srgb((float)rctf[2]/255.0f) * 255.0f) + 0.5f); + rct[0]= (unsigned char)((linearrgb_to_srgb((float)rct[0]/255.0f) * 255.0f) + 0.5f); + rct[1]= (unsigned char)((linearrgb_to_srgb((float)rct[1]/255.0f) * 255.0f) + 0.5f); + rct[2]= (unsigned char)((linearrgb_to_srgb((float)rct[2]/255.0f) * 255.0f) + 0.5f); } } ok= TRUE; -- 2.28.0