mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Merge pull request #356 from schdub/issue337
fix: query is missing in log when it contains \r or \t
This commit is contained in:
@@ -1052,9 +1052,10 @@ void DBBrowserDB::logSQL(QString statement, int msgtype)
|
||||
// Replace binary log messages by a placeholder text instead of printing gibberish
|
||||
for(int i=0;i<statement.size();i++)
|
||||
{
|
||||
if(statement.at(i) < 32 && statement.at(i) != '\n')
|
||||
QChar ch = statement[i];
|
||||
if(ch < 32 && ch != '\n' && ch != '\r' && ch != '\t')
|
||||
{
|
||||
statement.truncate(32);
|
||||
statement.truncate(i>0?i-1:0);
|
||||
statement.append(tr("... <string can not be logged, contains binary data> ..."));
|
||||
|
||||
// early exit if we detect a binary character,
|
||||
|
||||
Reference in New Issue
Block a user