I always cast everything to ints that I use in calculations, a (bad) habit of me.size_t makes more sense. your example seems to work great, thank you. I forgot I was using function pointers. Am I sure those functions aren't shift around during optimization?
for now the function is working like a charm. int memory I can see that d makes function size's multiples of four and fills the remaining bytes with cc's. is this coincidence and if not, why is this?