Skip to content

Commit

Permalink
fix: crash by NumberBox possibly being -21e
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Joker committed Aug 5, 2024
1 parent 0a2c034 commit fa6f26a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Starward/Pages/Setting/DownloadSettingPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ partial void OnDefaultInstallPathChanged(string? value)
private int speedLimit = AppConfig.SpeedLimitKBPerSecond;
partial void OnSpeedLimitChanged(int value)
{
int speed = value == 0 ? int.MaxValue : value * 1024;
int speed = value <= 0 ? int.MaxValue : value * 1024;
InstallGameManager.SpeedLimitBytesPerSecond = speed;
InstallGameManager.GlobalRateLimiter = InstallGameManager.GetRateLimiter(speed);
AppConfig.SpeedLimitKBPerSecond = value;
Expand Down

0 comments on commit fa6f26a

Please sign in to comment.