mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-12 03:27:06 +10:00
fix int conversion
This commit is contained in:
@@ -6560,11 +6560,13 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
if (path.isNotEmpty && path.length < hashWidth) {
|
||||
return;
|
||||
}
|
||||
final pathStartIndex = path.isNotEmpty ? path.length - hashWidth : 0;
|
||||
final publicKeyPrefixEnd = math.min(hashWidth, contact.publicKey.length).toInt();
|
||||
final pubkeyPrefix = path.isNotEmpty
|
||||
? path.sublist(math.max(0, path.length - hashWidth))
|
||||
? path.sublist(pathStartIndex)
|
||||
: contact.publicKey.sublist(
|
||||
0,
|
||||
math.min(hashWidth, contact.publicKey.length),
|
||||
publicKeyPrefixEnd,
|
||||
);
|
||||
final contactKeyHex = _resolveDirectRepeaterContactKeyHex(
|
||||
contact,
|
||||
|
||||
Reference in New Issue
Block a user