Won't this write a u64 value to the uin8_t ptr? The result of tctx->temp_buffer & 0x000000000000FF; should be a u64.