Skip to content

Commit c704245

Browse files
authored
Fix issue when VMWare win11 UEFI provides odd uint8
1 parent 7e4040a commit c704245

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qefi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ QByteArray qefi_get_variable(QUuid uuid, QString name)
634634
}
635635
else
636636
{
637-
for (size_t i = 0; i < length / skip; i++) {
637+
for (size_t i = 0; i < (length + skip - 1) / skip; i++) {
638638
for (size_t j = 0; j < skip; j++) {
639639
const quint8 byte = (quint8)((buffer[i] & (0xFF << (8 * j))) >> (8 * j));
640640
value.append(byte);

0 commit comments

Comments
 (0)