Skip to content

fix: use TryParse for screen property to avoid FormatException - #784

Open
Bolt4243 wants to merge 1 commit into
mpvnet-player:mainfrom
Bolt4243:fix/screen-trypars
Open

fix: use TryParse for screen property to avoid FormatException#784
Bolt4243 wants to merge 1 commit into
mpvnet-player:mainfrom
Bolt4243:fix/screen-trypars

Conversation

@Bolt4243

Copy link
Copy Markdown

ProcessProperty parsed the screen property with Convert.ToInt32, which throws FormatException on malformed values in mpv.conf. All other numeric properties in the same switch use int.TryParse-based helpers. This change makes screen consistent with those by using int.TryParse and silently ignoring invalid values.

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