mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-30 19:22:31 +00:00 
			
		
		
		
	Fix a segfault in dffinit when the value has too few bits
The code was already trying to add the required number of bits, but fell one short of the mark.
This commit is contained in:
		
							parent
							
								
									1ec6429bad
								
							
						
					
					
						commit
						8c2bdef36d
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -100,7 +100,7 @@ struct DffinitPass : public Pass { | |||
| 					for (int i = 0; i < GetSize(sig); i++) { | ||||
| 						if (init_bits.count(sig[i]) == 0) | ||||
| 							continue; | ||||
| 						while (GetSize(value.bits) < i) | ||||
| 						while (GetSize(value.bits) <= i) | ||||
| 							value.bits.push_back(State::S0); | ||||
| 						value.bits[i] = init_bits.at(sig[i]); | ||||
| 						cleanup_bits.insert(sig[i]); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue