mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Fix infinite loop in abc command under emscripten
This commit is contained in:
		
							parent
							
								
									bd87462b47
								
							
						
					
					
						commit
						9763e4d830
					
				
					 1 changed files with 7 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -550,11 +550,13 @@ std::string replace_tempdir(std::string text, std::string tempdir_name, bool sho
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	std::string  selfdir_name = proc_self_dirname();
 | 
			
		||||
	while (1) {
 | 
			
		||||
		size_t pos = text.find(selfdir_name);
 | 
			
		||||
		if (pos == std::string::npos)
 | 
			
		||||
			break;
 | 
			
		||||
		text = text.substr(0, pos) + "<yosys-exe-dir>/" + text.substr(pos + GetSize(selfdir_name));
 | 
			
		||||
	if (selfdir_name != "/") {
 | 
			
		||||
		while (1) {
 | 
			
		||||
			size_t pos = text.find(selfdir_name);
 | 
			
		||||
			if (pos == std::string::npos)
 | 
			
		||||
				break;
 | 
			
		||||
			text = text.substr(0, pos) + "<yosys-exe-dir>/" + text.substr(pos + GetSize(selfdir_name));
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return text;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue