mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Make room names own their own memory
This makes it so room names are no longer pointers to someone else's memory, and instead to set them you use `mapclass::setroomname`. If the string is short enough to fit in a static, no-alloc buffer, then it gets copied there. Otherwise, a new heap allocation is made that duplicates the string, and the new pointer is used instead. This makes it possible for room names to contain arbitrary data whose origin is temporary (e.g. from a script command that could be added in the future).
This commit is contained in:
@@ -755,6 +755,7 @@ static void cleanup(void)
|
||||
graphics.destroy_buffers();
|
||||
graphics.destroy();
|
||||
music.destroy();
|
||||
map.destroy();
|
||||
NETWORK_shutdown();
|
||||
SDL_Quit();
|
||||
FILESYSTEM_deinit();
|
||||
|
||||
Reference in New Issue
Block a user