Skip to content

Commit

Permalink
Fix row and column checking on SetData
Browse files Browse the repository at this point in the history
  • Loading branch information
Fatih Cetinkaya committed Aug 11, 2016
1 parent 91a79f2 commit d0a0d8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func (t *Table) Data() [][]string {
func (t *Table) SetData(row, col int, val string) error {

// Check row and column numbers
if row < 1 && col < 1 {
if row < 1 || col < 1 {
return errors.New("invalid row or column index")
}

Expand Down

0 comments on commit d0a0d8c

Please sign in to comment.