mirror of https://github.com/wb2osz/direwolf.git
				
				
				
			Fix IL2PTX config parsing
We were checking `*t` for end of string instead of `*c`, but `t` never changes, so we would run off of the end of the buffer and output a very large number of config errors before eventually crashing.
This commit is contained in:
		
							parent
							
								
									fed79a7978
								
							
						
					
					
						commit
						4bb4109a2d
					
				| 
						 | 
					@ -2380,7 +2380,7 @@ void config_init (char *fname, struct audio_s *p_audio_config,
 | 
				
			||||||
	    p_audio_config->achan[channel].il2p_invert_polarity = 0;
 | 
						    p_audio_config->achan[channel].il2p_invert_polarity = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	    while ((t = split(NULL,0)) != NULL) {
 | 
						    while ((t = split(NULL,0)) != NULL) {
 | 
				
			||||||
	      for (char *c = t; *t != '\0'; c++) {
 | 
						      for (char *c = t; *c != '\0'; c++) {
 | 
				
			||||||
	        switch (*c) {
 | 
						        switch (*c) {
 | 
				
			||||||
	          case '+':
 | 
						          case '+':
 | 
				
			||||||
	            p_audio_config->achan[channel].il2p_invert_polarity = 0;
 | 
						            p_audio_config->achan[channel].il2p_invert_polarity = 0;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue