Skip to content

Commit

Permalink
Add illegal char, whitespace, and newline checking for launch arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
vapidinfinity committed May 29, 2024
1 parent e180a05 commit bb39ea4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Mythic/Views/Unified/Sheets/GameSettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,10 @@ struct GameSettingsView: View {
Spacer()
TextField("", text: $typingArgument)
.onSubmit {
launchArguments.append(typingArgument)
typingArgument = .init()
if !typingArgument.trimmingCharacters(in: .illegalCharacters).trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
launchArguments.append(typingArgument)
typingArgument = .init()
}
}
}

Expand Down

0 comments on commit bb39ea4

Please sign in to comment.