From a7438f761960032e1150e6e1b30990062136bc15 Mon Sep 17 00:00:00 2001 From: Pyry Haulos Date: Tue, 2 Dec 2014 15:29:08 -0800 Subject: [PATCH] Fix bug in handling CRLF line endings in ShaderLibrary glsShaderLibrary.cpp failed to strip first empty line from shader strings if .test file was using CRLF line endings. That was leading to further issues later on. Bug: 18595005 Change-Id: Ia783c2bed4c838877c80f7c51bcf3fb021b75c8f --- modules/glshared/glsShaderLibrary.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/glshared/glsShaderLibrary.cpp b/modules/glshared/glsShaderLibrary.cpp index 386b16f..3d4d976 100644 --- a/modules/glshared/glsShaderLibrary.cpp +++ b/modules/glshared/glsShaderLibrary.cpp @@ -319,6 +319,7 @@ string ShaderParser::parseShaderSource (const char* str) // Eat first empty line from beginning. while (*p == ' ') p++; + if (*p == '\r') p++; if (*p == '\n') p++; while ((p[0] != '"') || (p[1] != '"')) -- 2.7.4