View Issue Details

IDProjectCategoryView StatusLast Update
0005509unrealircdpublic2020-01-02 13:06
ReporterGottem Assigned Tosyzop  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.0.0 
Target Version5.0.1Fixed in Version5.0.1 
Summary0005509: @if causes miscounting of line numbers shown in config errors
DescriptionIf you're using any @if blocks in your config, it screws with the line number reported in configtest hooks.

Conf example:
L10: @if $SERVER == 'some.server.tld'
L11:     someblock {
L12:         somename "somevalue";
L13:     };
L14: @endif
L15-30 // Other stuff
L31: otherblock {
L32:    invalidname "correctvalue";
L33: };


Now if I want to report an error about 'invalidname', cep->ce_varlinenum indicates the problem is on L30 rather than 32. I've confirmed that the counter is correct if you move 'otherblock' before all the @if stuff.
TagsNo tags attached.
3rd party modules

Activities

syzop

2020-01-02 13:06

administrator   ~0021186

commit 7278c9c8f4c7d425ee993f4be10962de1deda39f (HEAD -> unreal50, origin/unreal50)
Author: Bram Matthys <[email protected]>
Date: Thu Jan 2 13:05:26 2020 +0100

    @if causes miscounting of line numbers shown in config errors.
    Reported by Gottem in https://bugs.unrealircd.org/view.php?id=5509

Issue History

Date Modified Username Field Change
2019-12-27 19:08 Gottem New Issue
2019-12-27 19:08 Gottem Status new => assigned
2019-12-27 19:08 Gottem Assigned To => syzop
2020-01-02 13:06 syzop Status assigned => resolved
2020-01-02 13:06 syzop Resolution open => fixed
2020-01-02 13:06 syzop Fixed in Version => 5.0.1
2020-01-02 13:06 syzop Note Added: 0021186