mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Don't die on empty strings.
This commit is contained in:
		
							
								
								
									
										6
									
								
								CHANGES
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								CHANGES
									
									
									
									
									
								
							@@ -1,3 +1,7 @@
 | 
			
		||||
14 June 2008
 | 
			
		||||
 | 
			
		||||
* Don't die on empty strings in config file, reported by Will Maier.
 | 
			
		||||
 | 
			
		||||
08 June 2008
 | 
			
		||||
 | 
			
		||||
* Set socket mode +x if any sessions are attached and -x if not.
 | 
			
		||||
@@ -460,4 +464,4 @@
 | 
			
		||||
  (including mutt, emacs). No status bar yet and no key remapping or other
 | 
			
		||||
  customisation.
 | 
			
		||||
 | 
			
		||||
$Id: CHANGES,v 1.117 2008-06-08 19:49:04 nicm Exp $
 | 
			
		||||
$Id: CHANGES,v 1.118 2008-06-14 08:11:16 nicm Exp $
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								cfg.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								cfg.c
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: cfg.c,v 1.6 2008-06-02 22:16:27 nicm Exp $ */
 | 
			
		||||
/* $Id: cfg.c,v 1.7 2008-06-14 08:11:17 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -175,7 +175,7 @@ cfg_string(FILE *f, char endch, int esc)
 | 
			
		||||
	char   *buf;
 | 
			
		||||
	size_t	len;
 | 
			
		||||
 | 
			
		||||
        buf = NULL;
 | 
			
		||||
        buf = xmalloc(1);
 | 
			
		||||
	len = 0;
 | 
			
		||||
 | 
			
		||||
        while ((ch = getc(f)) != endch) {
 | 
			
		||||
@@ -211,6 +211,6 @@ cfg_string(FILE *f, char endch, int esc)
 | 
			
		||||
                buf[len++] = ch;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        buf[len] = '\0';
 | 
			
		||||
	buf[len] = '\0';
 | 
			
		||||
	return (buf);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user