mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	escape check fix
This commit is contained in:
		
							parent
							
								
									d673a72705
								
							
						
					
					
						commit
						da76ecb5f8
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -278,8 +278,9 @@ char *do_var_replacement(char *str) {
 | 
				
			||||||
	char *find = str;
 | 
						char *find = str;
 | 
				
			||||||
	while ((find = strchr(find, '$'))) {
 | 
						while ((find = strchr(find, '$'))) {
 | 
				
			||||||
		// Skip if escaped.
 | 
							// Skip if escaped.
 | 
				
			||||||
		if (find > str + 1 && find[-1] == '\\') {
 | 
							if (find > str && find[-1] == '\\') {
 | 
				
			||||||
			if (!(find > str + 2 && find[-2] == '\\')) {
 | 
								if (find == str + 1 || !(find > str + 1 && find[-2] == '\\')) {
 | 
				
			||||||
 | 
									++find;
 | 
				
			||||||
				continue;
 | 
									continue;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue