Skip to content

fix: guard minimum-aspect-ratio parsing against FormatException - #781

Open
Bolt4243 wants to merge 1 commit into
mpvnet-player:mainfrom
Bolt4243:fix/aspect-ratio-parse
Open

fix: guard minimum-aspect-ratio parsing against FormatException#781
Bolt4243 wants to merge 1 commit into
mpvnet-player:mainfrom
Bolt4243:fix/aspect-ratio-parse

Conversation

@Bolt4243

Copy link
Copy Markdown

ProcessProperty in App.cs called value.ToFloat() (which uses float.Parse) for the minimum-aspect-ratio and minimum-aspect-ratio-audio config keys. A malformed value in mpvnet.conf throws a FormatException and crashes startup.

Replace both assignments with float.TryParse, silently ignoring invalid values and leaving the property at its default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant