Index: /issm/trunk-jpl/src/c/modules/AllocateSystemMatricesx/AllocateSystemMatricesx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/AllocateSystemMatricesx/AllocateSystemMatricesx.cpp	(revision 21888)
+++ /issm/trunk-jpl/src/c/modules/AllocateSystemMatricesx/AllocateSystemMatricesx.cpp	(revision 21889)
@@ -195,5 +195,5 @@
 			/*Reinitialize flags to false*/
 			j=0;
-			while(true){
+			while(j<localnumnodes){
 				if(flagsindices[j]>=0){
 					flags[flagsindices[j]] = false;
