Merge pull request #105 from mccoyst/pick-a-choose

This is scanf
This commit is contained in:
Chris Sexton 2018-08-28 15:45:41 -04:00 committed by GitHub
commit d2936961b6
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
} }