summaryrefslogtreecommitdiff
path: root/rule-compiler/rule-compiler.js
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2017-02-21 15:28:01 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2017-02-21 15:28:01 -0800
commitb475bf4a2129239a1143efb41d8ee3fa5e9037fa (patch)
treeafbb5b1d36a33f981bedbee8b2ec8f7ad99713dd /rule-compiler/rule-compiler.js
parent54fa73844c0037138c7d5bad8ad27d1c441ca12c (diff)
downloadinfinitytier-b475bf4a2129239a1143efb41d8ee3fa5e9037fa.tar.gz
infinitytier-b475bf4a2129239a1143efb41d8ee3fa5e9037fa.zip
.
Diffstat (limited to 'rule-compiler/rule-compiler.js')
-rw-r--r--rule-compiler/rule-compiler.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/rule-compiler/rule-compiler.js b/rule-compiler/rule-compiler.js
index 5e8b56c8..1b3599a3 100644
--- a/rule-compiler/rule-compiler.js
+++ b/rule-compiler/rule-compiler.js
@@ -747,8 +747,8 @@ function compile(src,rules,caps,tags)
if ((id < 0)||(id > 0xffffffff))
return [ tag[k][1],tag[k][2],'Invalid or out of range tag ID.' ];
} else if (tkeyword === 'default') {
- if (id >= 0)
- return [ tag[k][1],tag[k][2],'Duplicate tag id definition.' ];
+ if (dfl !== null)
+ return [ tag[k][1],tag[k][2],'Duplicate tag default directive.' ];
if ((k + 1) >= tag.length)
return [ tag[k][1],tag[k][2],'Missing value for default.' ];
dfl = tag[++k][0]||null;