[Lua] mapmusname isn't being overwritten properly
No terminator character is copied into the field, thus making parts of a previous name seek through if it is longer than the one it's being set to.
Try it with this script: pressing Custom 1 will set mapmusname
to "AGZALT"
and Custom 2 will set it to "THZ2"
. In both cases, P_RestoreMusic
is called afterwards to play the music currently stored in mapmusname
, and its current value is printed into the console.
Pressing Custom 2 after having pressed Custom 1 will instead report that mapmusname
was set to "THZ2LT"
- the LT
part was carried over from "AGZALT"
.
This was discussed on the Discord server as well.