Skip to content

Allow for more than 10 clothes; fixes crash when loading map 'jendraz2'

Rokku requested to merge Rokkubo/lugaru:master into master

The map 'jendraz2' has a character with 11 clothes, however the clothes array is declared at length 10 and the tfile Person constructor does not check if numclothes>10 leading to undefined behaviour. This was not a visible issue prior to commit d818aca7 when clothes was changed to a std::string array. Changing clothes to length 12 allows this map to load and be converted to JSON.

Merge request reports