diff Python/compile.c @ 32717:0e890ac1c0f2 legacy-trunk

optimize_code(): Repaired gross error in new special-casing for None. The preceding case statement was missing a terminating "break" stmt, so fell into the new code by mistake. This caused uncaught out-of-bounds accesses to the "names" tuple, leading to a variety of insane behaviors.
author Tim Peters <tim.peters@gmail.com>
date Sat, 17 Jul 2004 05:00:52 +0000
parents c7c9b68ddda2
children efca55bbba0a
line wrap: on
line diff
--- a/Python/compile.c	Sat Jul 17 01:42:26 2004 +0000
+++ b/Python/compile.c	Sat Jul 17 05:00:52 2004 +0000
@@ -419,7 +419,8 @@
   			 continue;
 			SETARG(codestr, i, (j^1));
 			codestr[i+3] = NOP;
-		
+			break;
+
 		/* Replace LOAD_GLOBAL/LOAD_NAME None with LOAD_CONST None */
 		case LOAD_NAME:
 		case LOAD_GLOBAL: