Skip to content

Commit

Permalink
fix: int64 converted to string with unclear type
Browse files Browse the repository at this point in the history
  • Loading branch information
proletarius101 authored and foxcpp committed Sep 8, 2020
1 parent 09421d1 commit 53ebaff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ func decodeXtext(val string) (string, error) {
return ""
}

return string(char)
return string(rune(char))
})
if replaceErr != nil {
return "", replaceErr
Expand Down Expand Up @@ -947,12 +947,12 @@ func (c *Conn) WriteResponse(code int, enhCode EnhancedCode, text ...string) {
}

for i := 0; i < len(text)-1; i++ {
c.text.PrintfLine("%v-%v", code, text[i])
c.text.PrintfLine("%d-%v", code, text[i])
}
if enhCode == NoEnhancedCode {
c.text.PrintfLine("%v %v", code, text[len(text)-1])
c.text.PrintfLine("%d %v", code, text[len(text)-1])
} else {
c.text.PrintfLine("%v %v.%v.%v %v", code, enhCode[0], enhCode[1], enhCode[2], text[len(text)-1])
c.text.PrintfLine("%d %v.%v.%v %v", code, enhCode[0], enhCode[1], enhCode[2], text[len(text)-1])
}
}

Expand Down

0 comments on commit 53ebaff

Please sign in to comment.