Skip to content

Commit

Permalink
add comment for remove of null string
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Wilczynski committed Apr 10, 2021
1 parent aa7e198 commit 74b98d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/TTrigger.cpp
Expand Up @@ -356,6 +356,7 @@ bool TTrigger::match_perl(char* subject, const QString& toMatch, int regexNumber
char* tabptr = reinterpret_cast<char*>(name_table);
for (i = 0; i < namecount; i++) {
int n = (tabptr[0] << 8) | tabptr[1];
// Trim doesn't remove null character at the end of name that sometimes shows up
auto name = QString::fromUtf8(tabptr + 2, name_entry_size - 3).trimmed().remove(QStringLiteral("\u0000"));
char* substring_start = subject + ovector[2*n];
int substring_length = ovector[2*n+1] - ovector[2*n];
Expand Down

0 comments on commit 74b98d1

Please sign in to comment.