diff --git a/Test/badChars.frag b/Test/badChars.frag
index d67bf3a5e0b9ee926833dd42c3b790c6d232ddac..3e9700d9348b3671d32b4998865d8069c2c6dfb5 100644
--- a/Test/badChars.frag
+++ b/Test/badChars.frag
@@ -4,3 +4,4 @@
 #if
 #endif
 int aÿ
+#define A "ÿ
\ No newline at end of file
diff --git a/Test/baseResults/badChars.frag.out b/Test/baseResults/badChars.frag.out
index e9ebff7290a0a87046b9323455db3b83179fcd29..9a2aecab5d2f1522a26267f26e7c03a3bbed98da 100644
--- a/Test/baseResults/badChars.frag.out
+++ b/Test/baseResults/badChars.frag.out
@@ -5,8 +5,9 @@ ERROR: 0:3: '#error' : A <bad token> B
 ERROR: 0:4: 'preprocessor evaluation' : bad expression 
 ERROR: 0:4: '#if' : unexpected tokens following directive 
 ERROR: 0:6: '€' : unexpected token 
+ERROR: 0:7: 'string' : End of line in string 
 ERROR: 0:7: '' :  syntax error
-ERROR: 7 compilation errors.  No code generated.
+ERROR: 8 compilation errors.  No code generated.
 
 
 Shader version: 100
diff --git a/glslang/Include/revision.h b/glslang/Include/revision.h
index d1bce528c896dbcb21d428a9f6659037dcb6edf0..ccc2152a6e522e9067f9481a9f4bcdebd181ab4f 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.1861"
+#define GLSLANG_REVISION "Overload400-PrecQual.1865"
 #define GLSLANG_DATE "28-Feb-2017"
diff --git a/glslang/MachineIndependent/preprocessor/PpContext.h b/glslang/MachineIndependent/preprocessor/PpContext.h
index f7b352200fd26779dd7ea4bfe2a638bd574523a7..f1c41abd38df1bbe8c5a2aeb89010aa713aa7423 100644
--- a/glslang/MachineIndependent/preprocessor/PpContext.h
+++ b/glslang/MachineIndependent/preprocessor/PpContext.h
@@ -236,7 +236,7 @@ public:
         void reset() { current = 0; }
 
     protected:
-        void putSubtoken(int);
+        void putSubtoken(char);
         int getSubtoken();
         void ungetSubtoken();
 
diff --git a/glslang/MachineIndependent/preprocessor/PpTokens.cpp b/glslang/MachineIndependent/preprocessor/PpTokens.cpp
index 32d2b0b745ed48560bee7a896a16ead2cad27ab9..7fa06a5a4a896dc35d266be51f56e02b2b02a71f 100644
--- a/glslang/MachineIndependent/preprocessor/PpTokens.cpp
+++ b/glslang/MachineIndependent/preprocessor/PpTokens.cpp
@@ -96,9 +96,8 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 namespace glslang {
 
 // push onto back of stream
-void TPpContext::TokenStream::putSubtoken(int subtoken)
+void TPpContext::TokenStream::putSubtoken(char subtoken)
 {
-    assert((subtoken & ~0xff) == 0);
     data.push_back(static_cast<unsigned char>(subtoken));
 }
 
@@ -125,7 +124,8 @@ void TPpContext::TokenStream::putToken(int token, TPpToken* ppToken)
     const char* s;
     char* str = NULL;
 
-    putSubtoken(token);
+    assert((token & ~0xff) == 0);
+    putSubtoken(static_cast<char>(token));
 
     switch (token) {
     case PpAtomIdentifier: