Fix potential array overrun in act_to_str