Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/idlib/Lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,15 +547,15 @@ void idLexer::CreatePunctuationTable( const punctuation_t *punctuations ) {
newp = &punctuations[i];
lastp = -1;
//sort the punctuations in this table entry on length (longer punctuations first)
for (n = idLexer::punctuationtable[(unsigned int) newp->p[0]]; n >= 0; n = idLexer::nextpunctuation[n] ) {
for (n = idLexer::punctuationtable[(unsigned char) newp->p[0]]; n >= 0; n = idLexer::nextpunctuation[n] ) {
p = &punctuations[n];
if (strlen(p->p) < strlen(newp->p)) {
idLexer::nextpunctuation[i] = n;
if (lastp >= 0) {
idLexer::nextpunctuation[lastp] = i;
}
else {
idLexer::punctuationtable[(unsigned int) newp->p[0]] = i;
idLexer::punctuationtable[(unsigned char) newp->p[0]] = i;
}
break;
}
Expand All @@ -567,7 +567,7 @@ void idLexer::CreatePunctuationTable( const punctuation_t *punctuations ) {
idLexer::nextpunctuation[lastp] = i;
}
else {
idLexer::punctuationtable[(unsigned int) newp->p[0]] = i;
idLexer::punctuationtable[(unsigned char) newp->p[0]] = i;
}
}
}
Expand Down