Skip to content

Commit

Permalink
Merge pull request #61 from RafBishopFox/fix-backslash
Browse files Browse the repository at this point in the history
Fix for backslashes being replaced by null bytes
  • Loading branch information
lesnuages authored Jan 30, 2024
2 parents a558922 + 44a863d commit 6aca9b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inputrc/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,10 @@ func unescapeRunes(r []rune, i, end int) string {
var seq []rune
var char0, char1, char2, char3, char4, char5 rune

if len(r) == 1 {
return string(r)
}

for ; i < end; i++ {
if char0 = r[i]; char0 == '\\' {
char1, char2, char3, char4, char5 = grab(r, i+1, end), grab(r, i+2, end), grab(r, i+3, end), grab(r, i+4, end), grab(r, i+5, end)
Expand Down

0 comments on commit 6aca9b8

Please sign in to comment.