Skip to content

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

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

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

Conversation

@Noethix55555

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