mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-15 05:22:53 +08:00
Merge pull request #247 from BerndDonner/fix81
Bug Report and Fix: every 81th byte dropped in a frame
This commit is contained in:
commit
8045027d0d
@ -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()));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user