mirror of
				https://gitlab.com/klmp200/LO27.git
				synced 2025-11-04 15:13:05 +00:00 
			
		
		
		
	fix suppr
This commit is contained in:
		@@ -128,7 +128,11 @@ int SupprMatrixElem(Matrix matrix, int ColPos, int RowPos){
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	Row = GetElementPos(matrix.rows,RowPos);
 | 
			
		||||
	if (Row == NULL || Row->data == NULL){
 | 
			
		||||
	if (Row == NULL){
 | 
			
		||||
		return -1;
 | 
			
		||||
	}
 | 
			
		||||
	if (Row->data == NULL){
 | 
			
		||||
		RemoveElementPos(matrix.rows,RowPos);
 | 
			
		||||
		return -1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -146,12 +150,19 @@ int SupprMatrixElem(Matrix matrix, int ColPos, int RowPos){
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
	}
 | 
			
		||||
	if (Row->data == NULL){
 | 
			
		||||
		RemoveElementPos(matrix.rows,RowPos);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	Col = GetElementPos(matrix.cols,ColPos);
 | 
			
		||||
	if (Col == NULL|| Col->data == NULL){
 | 
			
		||||
	if (Col == NULL){
 | 
			
		||||
		return -2;
 | 
			
		||||
	}
 | 
			
		||||
	if (Col->data == NULL){
 | 
			
		||||
		RemoveElementPos(matrix.cols,ColPos);
 | 
			
		||||
		return -1;
 | 
			
		||||
	}
 | 
			
		||||
	if (Col->data->rowIndex == RowPos){
 | 
			
		||||
		Col->data = elem->nextRow;
 | 
			
		||||
	} else {
 | 
			
		||||
@@ -163,10 +174,12 @@ int SupprMatrixElem(Matrix matrix, int ColPos, int RowPos){
 | 
			
		||||
			return -4; /* WTF ?? */
 | 
			
		||||
		} else {
 | 
			
		||||
			tmp->nextRow = elem->nextRow;
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		}	
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
		if (Col->data == NULL){
 | 
			
		||||
		RemoveElementPos(matrix.cols,ColPos);
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	FreeCellElement(elem);
 | 
			
		||||
	return 1;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user