mirror of
				https://gitlab.com/klmp200/LO27.git
				synced 2025-11-04 10:23:04 +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);
 | 
						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;
 | 
							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);
 | 
						Col = GetElementPos(matrix.cols,ColPos);
 | 
				
			||||||
	if (Col == NULL|| Col->data == NULL){
 | 
						if (Col == NULL){
 | 
				
			||||||
		return -2;
 | 
							return -2;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						if (Col->data == NULL){
 | 
				
			||||||
 | 
							RemoveElementPos(matrix.cols,ColPos);
 | 
				
			||||||
 | 
							return -1;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	if (Col->data->rowIndex == RowPos){
 | 
						if (Col->data->rowIndex == RowPos){
 | 
				
			||||||
		Col->data = elem->nextRow;
 | 
							Col->data = elem->nextRow;
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
@@ -164,7 +175,9 @@ int SupprMatrixElem(Matrix matrix, int ColPos, int RowPos){
 | 
				
			|||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			tmp->nextRow = elem->nextRow;
 | 
								tmp->nextRow = elem->nextRow;
 | 
				
			||||||
		}	
 | 
							}	
 | 
				
			||||||
		
 | 
						}
 | 
				
			||||||
 | 
							if (Col->data == NULL){
 | 
				
			||||||
 | 
							RemoveElementPos(matrix.cols,ColPos);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	FreeCellElement(elem);
 | 
						FreeCellElement(elem);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user