aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2010-07-15 23:24:47 +0300
committerArnold D. Robbins <arnold@skeeve.com>2010-07-15 23:24:47 +0300
commitcce5115e21db1702e0617afdca36633e7e2c9eae (patch)
treed95602f28f00bc3419c142c111bacef765773715 /eval.c
parent3697ec5ca140f686643d204a54181a5ddbf9a799 (diff)
downloadegawk-cce5115e21db1702e0617afdca36633e7e2c9eae.tar.gz
egawk-cce5115e21db1702e0617afdca36633e7e2c9eae.tar.bz2
egawk-cce5115e21db1702e0617afdca36633e7e2c9eae.zip
Move to gawk 2.11.1 as found on Walnut Creek CD-ROM.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 4973b595..c88e7763 100644
--- a/eval.c
+++ b/eval.c
@@ -585,6 +585,8 @@ NODE *tree;
if ((lx = t2->numbr) == t2->numbr) { /* integer exponent */
if (lx == 0)
x = 1;
+ else if (lx == 1)
+ x = t1->numbr;
else {
/* doing it this way should be more precise */
for (x = x2 = t1->numbr; --lx; )
@@ -820,6 +822,8 @@ NODE *tree;
if ((ltemp = rval) == rval) { /* integer exponent */
if (ltemp == 0)
assign_number(lhs, (AWKNUM) 1);
+ else if (ltemp == 1)
+ assign_number(lhs, lval);
else {
/* doing it this way should be more precise */
for (t1 = t2 = lval; --ltemp; )