Your code screams wrongness because of the inconsistencies between the two files. In one, you access ptr and ptr, while in the other you access *(ptr + 0) and *(ptr + 1) ... that happens not to be a source of error here because the two syntaxes mean the same thing, but using two different forms is bad style, reads badly, and is error prone. But then, in one file you declare
void **ptr but in the other file you declare
void *ptr -- that can't possibly be be right, since the two ptrs have the same semantics (they each point to an array of two elements, a tf and an as). In one file you have a function that takes a parameter called ptr, but in the other file you pass the contents of a variable named ptr ... again, since the two ptrs have the same semantics, this inconsistency must be wrong, and clearly it's the dereference that is wrong. Remove that and you're passing a
void**, so that's what the parameter of func should be.
Code consistently and a whole class of errors will disappear from your code. You can code for 3 years or for 30 years, but it doesn't matter if you don't learn such fundamentals.