mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
fix clamp upper bound
This commit is contained in:
@@ -184,7 +184,7 @@ internal sealed class LaunchOptions : DbStoreOptions
|
||||
|
||||
static int RestrictIndex(List<NameValue<int>> monitors, string index)
|
||||
{
|
||||
return Math.Clamp(int.Parse(index, CultureInfo.InvariantCulture) - 1, 0, monitors.Count);
|
||||
return Math.Clamp(int.Parse(index, CultureInfo.InvariantCulture) - 1, 0, monitors.Count - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user