diff options
author | John Kessenich <cepheus@frii.com> | 2016-09-19 14:56:55 -0600 |
---|---|---|
committer | John Kessenich <cepheus@frii.com> | 2016-09-19 14:56:55 -0600 |
commit | 142785f324009289f8187868ab4843761693d7a9 (patch) | |
tree | c4b078d9ae3372f169c23a9552c83953755cbd2b /glslang | |
parent | 28b28140bb56aa89d2dfa72c199fb9c88276ee78 (diff) | |
download | glslang-142785f324009289f8187868ab4843761693d7a9.tar.gz |
HLSL: Change the final syntax-error printf to go to the infoLog.
Fixes issue #510.
Diffstat (limited to 'glslang')
-rw-r--r-- | glslang/Include/revision.h | 2 | ||||
-rw-r--r-- | glslang/MachineIndependent/InfoSink.cpp | 20 |
2 files changed, 13 insertions, 9 deletions
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()); } |