TerryCavanagh / VVVVVV

The source code to VVVVVV! http://thelettervsixtim.es/
Other
7k stars 559 forks source link

Fix possible dangling pointers in FontContainer.map_name_idx #938

Closed Daaaav closed 1 year ago

Daaaav commented 1 year ago

Changes:

The hashmap would get populated with the name of each font, as each font was being added. Unfortunately, adding a font would also realloc the storage for fonts, in which the names are also stored... Possibly invalidating the pointers to the names. This is now fixed by populating the hashmap after all the fonts are added.

Legal Stuff:

By submitting this pull request, I confirm that...