mirror of
				https://github.com/tmux/tmux.git
				synced 2025-10-26 12:27:15 +00:00 
			
		
		
		
	Fix printing commands with no arguments, from Benjamin Poirier.
This commit is contained in:
		
							
								
								
									
										5
									
								
								cmd.c
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								cmd.c
									
									
									
									
									
								
							| @@ -304,12 +304,11 @@ cmd_print(struct cmd *cmd, char *buf, size_t len) | |||||||
| 	if (off < len) { | 	if (off < len) { | ||||||
| 		used = args_print(cmd->args, buf + off, len - off); | 		used = args_print(cmd->args, buf + off, len - off); | ||||||
| 		if (used == 0) | 		if (used == 0) | ||||||
| 			buf[off - 1] = '\0'; | 			off--; | ||||||
| 		else { | 		else | ||||||
| 			off += used; | 			off += used; | ||||||
| 		buf[off] = '\0'; | 		buf[off] = '\0'; | ||||||
| 	} | 	} | ||||||
| 	} |  | ||||||
| 	return (off); | 	return (off); | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Nicholas Marriott
					Nicholas Marriott