From: Brian Norris <banorris@uci.edu>
Date: Tue, 29 May 2012 19:30:35 +0000 (-0700)
Subject: snapshot-interface: bugfix - fixup array indeces
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d43a0ee5e5c2c73f8774fa6ee11d060994f4a68b;p=cdsspec-compiler.git

snapshot-interface: bugfix - fixup array indeces

When removing code, I missed a few magic numbers in the code.
---

diff --git a/snapshot-interface.cc b/snapshot-interface.cc
index 26e0067..1bf12a2 100644
--- a/snapshot-interface.cc
+++ b/snapshot-interface.cc
@@ -66,11 +66,11 @@ void SnapshotGlobalSegments(){
 		MyString line;
 		while( procName.good() ){
 			getline( procName, line );
-			int i  = 0;
-			for( i = 0; i < 3; ++i ){
+			int i;
+			for( i = 0; i < 2; ++i ){
 				if( MyString::npos != line.find( dataSect[ i ].first ) ) break;			
 			}
-			if( i >= 3 || dataSect[ i ].second == true ) continue;
+			if( i >= 2 || dataSect[ i ].second == true ) continue;
 			dataSect[ i ].second = true;
 			if( !procName.good() )return;
 			getline( procName, line );