1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-22 14:52:25 +02:00

Huami 2021: Add null terminator to firmware device name matching

This commit is contained in:
José Rebelo 2022-09-21 23:52:05 +01:00
parent a6cb73e843
commit f38f5fbd85

View File

@ -158,7 +158,7 @@ public abstract class Huami2021FirmwareInfo extends AbstractHuamiFirmwareInfo {
} }
// On the MB7, this only works for firmwares > 1.8.5.1, not for any older firmware // On the MB7, this only works for firmwares > 1.8.5.1, not for any older firmware
if (!searchString32BitAligned(firmwareBin, deviceName())) { if (!searchString32BitAligned(firmwareBin, deviceName() + "\0")) {
LOG.warn("Failed to find {} in fwBytes", deviceName()); LOG.warn("Failed to find {} in fwBytes", deviceName());
return false; return false;
} }