mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Erm, check the right length for short cmds.
This commit is contained in:
		
							
								
								
									
										4
									
								
								tmux.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								tmux.c
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: tmux.c,v 1.15 2007-09-27 10:09:37 nicm Exp $ */
 | 
			
		||||
/* $Id: tmux.c,v 1.16 2007-09-27 20:54:43 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -187,7 +187,7 @@ main(int argc, char **argv)
 | 
			
		||||
 | 
			
		||||
	for (i = 0; i < NOP; i++) {
 | 
			
		||||
		op = op_table + i;
 | 
			
		||||
		if (strncmp(argv[0], op->cmd, strlen(op->cmd)) == 0 ||
 | 
			
		||||
		if (strncmp(argv[0], op->cmd, strlen(argv[0])) == 0 ||
 | 
			
		||||
		    (op->alias != NULL && strcmp(argv[0], op->alias) == 0))
 | 
			
		||||
			exit(op->fn(path, argc, argv));
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user