mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-24 15:25:31 -04:00
Improve readability of code
This commit is contained in:
parent
f1d99dd0ed
commit
86cd2c09a4
1 changed files with 1 additions and 5 deletions
|
@ -125,13 +125,9 @@ QVariant Base32::decode(const QByteArray& encodedData)
|
||||||
|
|
||||||
const int offset = (nQuantumBytes - 1) * 8;
|
const int offset = (nQuantumBytes - 1) * 8;
|
||||||
quint64 mask = quint64(0xFF) << offset;
|
quint64 mask = quint64(0xFF) << offset;
|
||||||
for (int n = offset; n >= 0; n -= 8) {
|
for (int n = offset; n >= 0 && o < nBytes; n -= 8) {
|
||||||
if (o < nBytes) {
|
|
||||||
data[o++] = static_cast<char>((quantum & mask) >> n);
|
data[o++] = static_cast<char>((quantum & mask) >> n);
|
||||||
mask >>= 8;
|
mask >>= 8;
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue