Error if hash bound is less than 2
Bad things happen otherwise.
This commit is contained in:
		
							parent
							
								
									761979d33e
								
							
						
					
					
						commit
						06fb025496
					
				
							
								
								
									
										1
									
								
								chat.c
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								chat.c
									
									
									
									
									
								
							| @ -123,6 +123,7 @@ uint32_t hashBound = 75; | |||||||
| static void parseHash(char *str) { | static void parseHash(char *str) { | ||||||
| 	hashInit = strtoul(str, &str, 0); | 	hashInit = strtoul(str, &str, 0); | ||||||
| 	if (*str) hashBound = strtoul(&str[1], NULL, 0); | 	if (*str) hashBound = strtoul(&str[1], NULL, 0); | ||||||
|  | 	if (hashBound < 2) errx(EX_USAGE, "hash bound must be >= 2"); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #ifdef __OpenBSD__ | #ifdef __OpenBSD__ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user