diff --git a/features/FEATURE_BLE/ble/BLETypes.h b/features/FEATURE_BLE/ble/BLETypes.h index 4c5732dc05..856f3ca84d 100644 --- a/features/FEATURE_BLE/ble/BLETypes.h +++ b/features/FEATURE_BLE/ble/BLETypes.h @@ -227,7 +227,7 @@ public: for (int i = 5, m = 100000; i >= 0; --i, m /= 10) { uint32_t result = passkey / m; ascii[i] = NUMBER_OFFSET + result; - passkey -= result; + passkey -= result * m; } }