diff --git a/desktop_version/src/CustomLevels.cpp b/desktop_version/src/CustomLevels.cpp index 3fccdd8b..58c359e6 100644 --- a/desktop_version/src/CustomLevels.cpp +++ b/desktop_version/src/CustomLevels.cpp @@ -1366,7 +1366,10 @@ bool customlevelclass::save(const std::string& _path) msg = xml::update_element_delete_contents(data, "levelMetaData"); int temp_platv[numrooms]; - SDL_memset(temp_platv, 4 /* default */, sizeof(temp_platv)); + for (size_t i = 0; i < SDL_arraysize(temp_platv); ++i) + { + temp_platv[i] = 4; /* default */ + } if (mapwidth < maxwidth) {