[latex3-commits] [latex3/latex3] main: Check invalid identifier in `\fp_clear_function:n` (1e363250d)
github at latex-project.org
github at latex-project.org
Thu Oct 26 18:05:45 CEST 2023
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/1e363250d65d4d860a2c337888cfb1b76a7ae2ae
>---------------------------------------------------------------
commit 1e363250d65d4d860a2c337888cfb1b76a7ae2ae
Author: Yukai Chou <muzimuzhi at gmail.com>
Date: Thu Oct 26 07:16:39 2023 +0800
Check invalid identifier in `\fp_clear_function:n`
>---------------------------------------------------------------
1e363250d65d4d860a2c337888cfb1b76a7ae2ae
l3kernel/l3fp-functions.dtx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/l3kernel/l3fp-functions.dtx b/l3kernel/l3fp-functions.dtx
index bb81fa67e..eb54b727a 100644
--- a/l3kernel/l3fp-functions.dtx
+++ b/l3kernel/l3fp-functions.dtx
@@ -264,8 +264,12 @@
{ \exp_args:No \@@_clear_function:n { \tl_to_str:n {#1} } }
\cs_new_protected:Npn \@@_clear_function:n #1
{
- \cs_set_eq:cN { @@_#1_o:w } \tex_undefine:D
- \@@_function_set_parsing:Nn \cs_set_eq:NN {#1}
+ \@@_id_if_invalid:nTF {#1}
+ { \msg_error:nnn { fp } { invalid-identifier } {#1} }
+ {
+ \cs_set_eq:cN { @@_#1_o:w } \tex_undefine:D
+ \@@_function_set_parsing:Nn \cs_set_eq:NN {#1}
+ }
}
% \end{macrocode}
% \end{macro}
More information about the latex3-commits
mailing list.