This is scanf

This commit is contained in:
Steve McCoy 2018-08-28 15:43:12 -04:00 committed by GitHub
parent 9d68d4bf21
commit 807e235489
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ func (p *PickerPlugin) Message(message msg.Message) bool {
} else if strings.HasPrefix(body, "pick") && strings.HasSuffix(body, sfx) { } else if strings.HasPrefix(body, "pick") && strings.HasSuffix(body, sfx) {
var n int var n int
var q string var q string
_, err := fmt.Sscanf(body, "pick %d %s", n, q) _, err := fmt.Sscanf(body, "pick %d %s", &n, &q)
if err != nil || q != "{" { if err != nil || q != "{" {
return false return false
} }