aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.y
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-10-21 20:59:19 +0300
committerArnold D. Robbins <arnold@skeeve.com>2017-10-21 20:59:19 +0300
commit2d292c06360febc796bc21c9e75bdda84a158158 (patch)
treee24fc0071beca1d1e26a2267340fb5f1b4ed73cf /awkgram.y
parent73a0bda71873bdc095f171d3d8bf322b974a010d (diff)
downloadegawk-2d292c06360febc796bc21c9e75bdda84a158158.tar.gz
egawk-2d292c06360febc796bc21c9e75bdda84a158158.tar.bz2
egawk-2d292c06360febc796bc21c9e75bdda84a158158.zip
Don't fold constant strings if either is translatable.
Diffstat (limited to 'awkgram.y')
-rw-r--r--awkgram.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/awkgram.y b/awkgram.y
index 1a75e641..9f351436 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -1589,7 +1589,8 @@ common_exp
// 1.5 "" # can't fold this if program mucks with CONVFMT.
// See test #12 in test/posix.awk.
- if ((n1->flags & (NUMBER|NUMINT)) != 0 || (n2->flags & (NUMBER|NUMINT)) != 0)
+ // Also can't fold if one or the other is translatable.
+ if ((n1->flags & (NUMBER|NUMINT|INTLSTR)) != 0 || (n2->flags & (NUMBER|NUMINT|INTLSTR)) != 0)
goto plain_concat;
n1 = force_string(n1);