mirror of
				https://github.com/stedolan/jq.git
				synced 2024-05-11 05:55:39 +00:00 
			
		
		
		
	Fix some confusion between "null" and "invalid".
This commit is contained in:
		
							
								
								
									
										4
									
								
								c/jv.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								c/jv.c
									
									
									
									
									
								
							@@ -619,7 +619,7 @@ static jv* jvp_object_write(jv_complex* object, jvp_string* key) {
 | 
			
		||||
    jvp_string_free_p(key);
 | 
			
		||||
  } else {
 | 
			
		||||
    slot = jvp_object_add_slot(object, key, bucket);
 | 
			
		||||
    slot->value = jv_null();
 | 
			
		||||
    slot->value = jv_invalid();
 | 
			
		||||
  }
 | 
			
		||||
  if (slot == 0) {
 | 
			
		||||
    jvp_object_rehash(object);
 | 
			
		||||
@@ -627,7 +627,7 @@ static jv* jvp_object_write(jv_complex* object, jvp_string* key) {
 | 
			
		||||
    assert(!jvp_object_find_slot(object, key, bucket));
 | 
			
		||||
    slot = jvp_object_add_slot(object, key, bucket);
 | 
			
		||||
    assert(slot);
 | 
			
		||||
    slot->value = jv_null();
 | 
			
		||||
    slot->value = jv_invalid();
 | 
			
		||||
  }
 | 
			
		||||
  return &slot->value;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user