From d43a0ee5e5c2c73f8774fa6ee11d060994f4a68b Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Tue, 29 May 2012 12:30:35 -0700 Subject: [PATCH] snapshot-interface: bugfix - fixup array indeces When removing code, I missed a few magic numbers in the code. --- snapshot-interface.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 ); -- 2.34.1