mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Use isnan
This commit is contained in:
		
							parent
							
								
									01ec18e802
								
							
						
					
					
						commit
						bcceb61b43
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -27,7 +27,7 @@ struct cmd_results *input_cmd_calibration_matrix(int argc, char **argv) {
 | 
				
			||||||
	for (int i = 0; i < split->length; ++i) {
 | 
						for (int i = 0; i < split->length; ++i) {
 | 
				
			||||||
		char *item = split->items[i];
 | 
							char *item = split->items[i];
 | 
				
			||||||
		float x = parse_float(item);
 | 
							float x = parse_float(item);
 | 
				
			||||||
		if (x != x) {
 | 
							if (isnan(x)) {
 | 
				
			||||||
			return cmd_results_new(CMD_FAILURE, "calibration_matrix: unable to parse float: %s", item);
 | 
								return cmd_results_new(CMD_FAILURE, "calibration_matrix: unable to parse float: %s", item);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		parsed[i] = x;
 | 
							parsed[i] = x;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue