Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions Other/Citra_per_game_config/v2/CitraConfigHelpers.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@
; Escaped string safe for use in regex patterns
; ============================================================================
RegExEscape(str) {
static specials := "()[]{}?*+|^$.\"
out := ""
for char in StrSplit(str)
out .= InStr(specials, char) ? "\" char : char
return out
return RegExReplace(str, "([\\()\[\]{}?*+|^$.])", "\$1")
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The replacement string "$1" likely escapes the $ in the regex replacement, resulting in the literal text "$1" being inserted rather than the captured character. To prefix each matched special character with a literal backslash, the replacement should emit a backslash plus capture 1 (e.g., use a replacement that represents \ + $1, such as "\$1").

Copilot uses AI. Check for mistakes.
}

; ============================================================================
Expand Down
Loading