Preserve trailing space in ": "
in a long message
Previously, the `strcpy` would preserve the `:`, but overwrite the ` `. This is probably not what the player wants, since the first `": "` in the line can direct a message to specific recipients, but a bare `":"` will not. As a result, the old system would send the first part privately, but then mangle the directed-message prefix such that subsequent parts were sent publicly. Switch to preserve the trailing space so that the `": "` retains its special meaning in subsequent messages.
This commit is contained in:
parent
1a2ca399b3
commit
1e093bacae
|
@ -1553,7 +1553,7 @@ window_event_result multi_message_input_sub(const d_robot_info_array &Robot_info
|
|||
multi_send_msgsend_state(msgsend_state::typing);
|
||||
auto pcolon = strstr(Network_message.data(), ": " );
|
||||
if ( pcolon )
|
||||
strcpy( pcolon+1, ptext );
|
||||
strcpy( pcolon+2, ptext );
|
||||
else
|
||||
strcpy(Network_message.data(), ptext);
|
||||
multi_message_index = strlen( Network_message );
|
||||
|
|
Loading…
Reference in a new issue