summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2002-06-15 13:56:12 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2002-06-16 03:29:09 +0000
commit90fcb90269601d48315e5be1fd5ddd0619d05f27 (patch)
tree9373f93acf82a9feadb4e498a5429bb27f84dc23 /pp.c
parent07b0e447e5dffb77ce06dc459eeb25d4d36b8d06 (diff)
downloadperl-90fcb90269601d48315e5be1fd5ddd0619d05f27.tar.gz
pp.c:pp_pow() -- quit when you're done
From: "Craig A. Berry" <craigberry@mac.com> Message-Id: <a05111b15b93181a27d6d@[172.16.52.1]> p4raw-id: //depot/perl@17255
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pp.c b/pp.c
index ae29d7930d..7fa9c06933 100644
--- 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--;