mirror of
				https://github.com/onyx-and-iris/vmrcli.git
				synced 2025-10-31 13:11:49 +00:00 
			
		
		
		
	remove unnecessary args in log_trace calls
ensure we shift a char after copying next command from input buffer
This commit is contained in:
		
							parent
							
								
									3c46b3d9f3
								
							
						
					
					
						commit
						161b1061c4
					
				| @ -92,13 +92,13 @@ bool is_pdirty(T_VBVMR_INTERFACE *vmr) | ||||
| 
 | ||||
| long get_parameter_float(T_VBVMR_INTERFACE *vmr, char *param, float *f) | ||||
| { | ||||
|     log_trace("VBVMR_GetParameterFloat(%s, <float> *f)", param, f); | ||||
|     log_trace("VBVMR_GetParameterFloat(%s, <float> *f)", param); | ||||
|     return vmr->VBVMR_GetParameterFloat(param, f); | ||||
| } | ||||
| 
 | ||||
| long get_parameter_string(T_VBVMR_INTERFACE *vmr, char *param, unsigned short *s) | ||||
| { | ||||
|     log_trace("VBVMR_GetParameterStringW(%s, <unsigned short> *s)", param, s); | ||||
|     log_trace("VBVMR_GetParameterStringW(%s, <unsigned short> *s)", param); | ||||
|     return vmr->VBVMR_GetParameterStringW(param, s); | ||||
| } | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										10
									
								
								src/vmrcli.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								src/vmrcli.c
									
									
									
									
									
								
							| @ -171,9 +171,8 @@ int init_voicemeeter(T_VBVMR_INTERFACE *vmr, int kind) | ||||
| 
 | ||||
| void interactive(T_VBVMR_INTERFACE *vmr) | ||||
| { | ||||
|     char input[MAX_LINE]; | ||||
|     char input[MAX_LINE], command[MAX_LINE]; | ||||
|     char *p = input; | ||||
|     char command[MAX_LINE]; | ||||
|     int i; | ||||
|     size_t len; | ||||
| 
 | ||||
| @ -199,14 +198,15 @@ void interactive(T_VBVMR_INTERFACE *vmr) | ||||
|             while (!isspace(*p)) | ||||
|                 command[i++] = *p++; | ||||
|             command[i] = '\0'; | ||||
|             p++; /* shift to next char */ | ||||
| 
 | ||||
|             if (command[0] != '\0') | ||||
|                 parse_command(vmr, command); | ||||
|             memset(command, '\0', sizeof(command)); | ||||
|             memset(command, '\0', MAX_LINE); | ||||
|         } | ||||
| 
 | ||||
|         p = input;                          /* reset pointer */ | ||||
|         memset(input, '\0', sizeof(input)); /* reset input buffer */ | ||||
|         p = input;                     /* reset pointer */ | ||||
|         memset(input, '\0', MAX_LINE); /* reset input buffer */ | ||||
|         printf(">> "); | ||||
|     } | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user