From 142785f324009289f8187868ab4843761693d7a9 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Mon, 19 Sep 2016 14:56:55 -0600 Subject: HLSL: Change the final syntax-error printf to go to the infoLog. Fixes issue #510. --- glslang/Include/revision.h | 2 +- glslang/MachineIndependent/InfoSink.cpp | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) (limited to 'glslang') diff --git a/glslang/Include/revision.h b/glslang/Include/revision.h index 0a9710cf..1fc0ca7e 100644 --- a/glslang/Include/revision.h +++ b/glslang/Include/revision.h @@ -2,5 +2,5 @@ // For the version, it uses the latest git tag followed by the number of commits. // For the date, it uses the current date (when then script is run). -#define GLSLANG_REVISION "Overload400-PrecQual.1494" +#define GLSLANG_REVISION "Overload400-PrecQual.1495" #define GLSLANG_DATE "19-Sep-2016" diff --git a/glslang/MachineIndependent/InfoSink.cpp b/glslang/MachineIndependent/InfoSink.cpp index aa0fe89a..79acba87 100644 --- a/glslang/MachineIndependent/InfoSink.cpp +++ b/glslang/MachineIndependent/InfoSink.cpp @@ -38,11 +38,15 @@ namespace glslang { -void TInfoSinkBase::append(const char* s) +void TInfoSinkBase::append(const char* s) { if (outputStream & EString) { - checkMem(strlen(s)); - sink.append(s); + if (s == nullptr) + sink.append("(null)"); + else { + checkMem(strlen(s)); + sink.append(s); + } } //#ifdef _WIN32 @@ -54,10 +58,10 @@ void TInfoSinkBase::append(const char* s) fprintf(stdout, "%s", s); } -void TInfoSinkBase::append(int count, char c) +void TInfoSinkBase::append(int count, char c) { if (outputStream & EString) { - checkMem(count); + checkMem(count); sink.append(count, c); } @@ -74,10 +78,10 @@ void TInfoSinkBase::append(int count, char c) fprintf(stdout, "%c", c); } -void TInfoSinkBase::append(const TPersistString& t) +void TInfoSinkBase::append(const TPersistString& t) { if (outputStream & EString) { - checkMem(t.size()); + checkMem(t.size()); sink.append(t); } @@ -93,7 +97,7 @@ void TInfoSinkBase::append(const TPersistString& t) void TInfoSinkBase::append(const TString& t) { if (outputStream & EString) { - checkMem(t.size()); + checkMem(t.size()); sink.append(t.c_str()); } -- cgit v1.2.3