projects
/
xonotic
/
gmqcc.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11ecc6c
)
User supplied math constants take precedence
author
Dale Weiler <killfieldengine@gmail.com>
Sun, 1 Dec 2013 15:30:24 +0000
(10:30 -0500)
committer
Dale Weiler <killfieldengine@gmail.com>
Sun, 1 Dec 2013 15:30:24 +0000
(10:30 -0500)
ftepp.c
patch
|
blob
|
history
diff --git
a/ftepp.c
b/ftepp.c
index fc6732e5647d9548f0e4199ec5a9de1aef4b1739..82495b44e3c2353ebe101af7b43dd84359882c2e 100644
(file)
--- a/
ftepp.c
+++ b/
ftepp.c
@@
-539,9
+539,11
@@
static bool ftepp_define(ftepp_t *ftepp)
macro = ftepp_macro_find(ftepp, ftepp_tokval(ftepp));
- /* ignore creating a math macro if one is already present */
- if (macro && mathconstant)
- break;
+ /* user defined ones take precedence */
+ if (macro && mathconstant) {
+ ftepp_macro_delete(ftepp, ftepp_tokval(ftepp));
+ macro = NULL;
+ }
if (macro && ftepp->output_on) {
if (ftepp_warn(ftepp, WARN_CPP, "redefining `%s`", ftepp_tokval(ftepp)))