From b8bf0ee822a742039d364991e712dda09b58eb61 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 12 Sep 2011 09:47:28 +0000 Subject: Fix #28613: SEGFAULT: When setting Best-Quality on a Bump Map in GLSL viewport Problem was caused by CRLF line ending instead of LF line ending. Re-generate pu_shader_material to use LF line ending and made gpu codegen treat \r as space character. --- source/blender/gpu/intern/gpu_codegen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/gpu/intern/gpu_codegen.c') diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index f02aee8d8af..b47f6687720 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -93,7 +93,7 @@ static char *gpu_str_skip_token(char *str, char *token, int max) /* skip a variable/function name */ while(*str) { - if(ELEM6(*str, ' ', '(', ')', ',', '\t', '\n')) + if(ELEM7(*str, ' ', '(', ')', ',', '\t', '\n', '\r')) break; else { if(token && len < max-1) { @@ -111,7 +111,7 @@ static char *gpu_str_skip_token(char *str, char *token, int max) /* skip the next special characters: * note the missing ')' */ while(*str) { - if(ELEM5(*str, ' ', '(', ',', '\t', '\n')) + if(ELEM6(*str, ' ', '(', ',', '\t', '\n', '\r')) str++; else break; -- cgit v1.2.3