PP: Fix issue #738: don't assert on characters within a string.
This commit is contained in:
@@ -236,7 +236,7 @@ public:
|
||||
void reset() { current = 0; }
|
||||
|
||||
protected:
|
||||
void putSubtoken(int);
|
||||
void putSubtoken(char);
|
||||
int getSubtoken();
|
||||
void ungetSubtoken();
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user