Fixed off-by-one error in config parse error line output
This commit is contained in:
parent
5de5349fde
commit
60d83288df
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user