mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Fix condition in peek_line
This commit is contained in:
		
							parent
							
								
									8bfa2def88
								
							
						
					
					
						commit
						fbca3bbacb
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -58,7 +58,7 @@ char *peek_line(FILE *file, int offset, long *position) {
 | 
			
		|||
		if (read < 0) {
 | 
			
		||||
			break;
 | 
			
		||||
		}
 | 
			
		||||
		if (line[read - 1] == '\n') {
 | 
			
		||||
		if (read > 0 && line[read - 1] == '\n') {
 | 
			
		||||
			line[read - 1] = '\0';
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue