pp.c:pp_pow() -- quit when you're done
Craig A. Berry [Sat, 15 Jun 2002 18:56:12 +0000 (13:56 -0500)]
From: "Craig A. Berry" <craigberry@mac.com>
Message-Id: <a05111b15b93181a27d6d@[172.16.52.1]>

p4raw-id: //depot/perl@17255

pp.c

diff --git a/pp.c b/pp.c
index ae29d79..7fa9c06 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -956,6 +956,8 @@ PP(pp_pow)
                             result *= base;
                             /* Only bother to clear the bit if it is set.  */
                             power &= ~bit;
+                           /* Avoid squaring base again if we're done. */
+                           if (power == 0) break;
                         }
                     }
                     SP--;