Merge pull request #247 from BerndDonner/fix81

Bug Report and Fix: every 81th byte dropped in a frame
This commit is contained in:
Alex Spataru 2024-12-06 13:29:19 -05:00 committed by GitHub
commit 8045027d0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -695,13 +695,12 @@ QString IO::Console::hexadecimalStr(const QByteArray &data)
// Convert data to string with dump every ~80 chars
QString str;
const int characters = 80;
for (int i = 0; i < copy.length(); ++i)
for (int i = 0; i < copy.length(); i += characters)
{
QByteArray line;
for (int j = 0; j < qMin(characters, copy.length() - i); ++j)
line.append(copy.at(i + j));
i += characters;
str.append(HexDump(line.data(), line.size()));
}