Skip to content

Commit

Permalink
Improve readability of code
Browse files Browse the repository at this point in the history
  • Loading branch information
adolfogc authored and phoerious committed Oct 21, 2017
1 parent f1d99dd commit 86cd2c0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/core/Base32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,9 @@ QVariant Base32::decode(const QByteArray& encodedData)

const int offset = (nQuantumBytes - 1) * 8;
quint64 mask = quint64(0xFF) << offset;
for (int n = offset; n >= 0; n -= 8) {
if (o < nBytes) {
for (int n = offset; n >= 0 && o < nBytes; n -= 8) {
data[o++] = static_cast<char>((quantum & mask) >> n);
mask >>= 8;
} else {
break;
}
}
}

Expand Down

0 comments on commit 86cd2c0

Please sign in to comment.