(svn r25956) -Fix [FS#5772]: temporary persistent storage modifications, e.g. command tests or those from GUI, were not properly reset, creating the possibility of desyncs
This commit is contained in:
		@@ -84,7 +84,7 @@ struct PersistentStorageArray : BaseStorageArray {
 | 
				
			|||||||
		if (this->storage[pos] == value) return;
 | 
							if (this->storage[pos] == value) return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/* We do not have made a backup; lets do so */
 | 
							/* We do not have made a backup; lets do so */
 | 
				
			||||||
		if (this->prev_storage != NULL) {
 | 
							if (this->prev_storage == NULL) {
 | 
				
			||||||
			this->prev_storage = MallocT<TYPE>(SIZE);
 | 
								this->prev_storage = MallocT<TYPE>(SIZE);
 | 
				
			||||||
			memcpy(this->prev_storage, this->storage, sizeof(this->storage));
 | 
								memcpy(this->prev_storage, this->storage, sizeof(this->storage));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -121,6 +121,7 @@ struct PersistentStorageArray : BaseStorageArray {
 | 
				
			|||||||
			memcpy(this->storage, this->prev_storage, sizeof(this->storage));
 | 
								memcpy(this->storage, this->prev_storage, sizeof(this->storage));
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		free(this->prev_storage);
 | 
							free(this->prev_storage);
 | 
				
			||||||
 | 
							this->prev_storage = NULL;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user