Fix invalid sizeof in set_f.