Fixed off-by-one error in config parse error line output

This commit is contained in:
Christopher Ramey 2020-08-15 18:32:45 -08:00
parent 5de5349fde
commit 60d83288df

View File

@ -86,7 +86,7 @@ func ReadConfig(fn string) (*AlrmConfig, error) {
parser.SetState(TK_MONITOR) parser.SetState(TK_MONITOR)
default: default:
return nil, fmt.Errorf("Invalid token in %s, line %d: \"%s\"", return nil, fmt.Errorf("Invalid token in %s, line %d: \"%s\"",
fn, parser.Line, tk) fn, parser.Line+1, tk)
} }
case TK_MONITOR: case TK_MONITOR: