mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-10-29 05:40:27 -04:00 
			
		
		
		
	test: fix loading json test data
Multiline results were not loaded correctly.
This commit is contained in:
		
							parent
							
								
									9c31cf1271
								
							
						
					
					
						commit
						eea18a8a8a
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -773,14 +773,14 @@ static char *read_json_testcase(FILE *f, char **name, size_t *size, char **resul | ||||||
| 			buf = NULL; | 			buf = NULL; | ||||||
| 			alloc = 0; | 			alloc = 0; | ||||||
| 		} else { | 		} else { | ||||||
| 			char *p = realloc(*dst, len + res + 1); | 			char *p = realloc(*dst, *dst_len + res + 1); | ||||||
| 
 | 
 | ||||||
| 			pwtest_ptr_notnull(p); | 			pwtest_ptr_notnull(p); | ||||||
| 
 | 
 | ||||||
| 			*dst = p; | 			*dst = p; | ||||||
| 			memcpy(*dst + len, buf, res); | 			memcpy(*dst + *dst_len, buf, res); | ||||||
| 			*dst_len += res; | 			*dst_len += res; | ||||||
| 			(*dst)[len] = '\0'; | 			(*dst)[*dst_len] = '\0'; | ||||||
| 		} | 		} | ||||||
| 	} while (1); | 	} while (1); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Pauli Virtanen
						Pauli Virtanen