From 1f3ab806bd56dfaf4009fc791022619f1e17ee01 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Tue, 17 Dec 2024 18:23:49 +0300 Subject: [PATCH] Disallowing duplicating def macro arguments --- jsm.inc.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jsm.inc.php b/jsm.inc.php index fd71061..6ef6ac2 100644 --- a/jsm.inc.php +++ b/jsm.inc.php @@ -1565,6 +1565,8 @@ class JSM_ArgsParser { $this->skip_whitespace(); $value = $this->parse_arg_value(); + if(isset($out[$name])) + throw new Exception("Argument '{$name}' is already defined in def macro"); $out[$name] = $value; $this->skip_whitespace(); $ch = $this->next();