Skip to content

Commit

Permalink
Fix issue when VMWare win11 UEFI provides odd uint8
Browse files Browse the repository at this point in the history
  • Loading branch information
Inokinoki authored Dec 9, 2024
1 parent 7e4040a commit c704245
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qefi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ QByteArray qefi_get_variable(QUuid uuid, QString name)
}
else
{
for (size_t i = 0; i < length / skip; i++) {
for (size_t i = 0; i < (length + skip - 1) / skip; i++) {
for (size_t j = 0; j < skip; j++) {
const quint8 byte = (quint8)((buffer[i] & (0xFF << (8 * j))) >> (8 * j));
value.append(byte);
Expand Down

0 comments on commit c704245

Please sign in to comment.