mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-12 03:27:06 +10:00
add clamp for path length
This commit is contained in:
@@ -348,7 +348,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
}
|
||||
|
||||
String _pathHashModeSubtitle(int pathHashByteWidth) {
|
||||
final width = pathHashByteWidth.clamp(1, 3).toInt();
|
||||
final width = pathHashByteWidth.clamp(1, 4).toInt();
|
||||
final mode = width - 1;
|
||||
final unit = width == 1 ? 'byte' : 'bytes';
|
||||
return 'Mode $mode - $width $unit per hop';
|
||||
|
||||
Reference in New Issue
Block a user