diff --git a/src/storage/dd/CuddDd.cpp b/src/storage/dd/CuddDd.cpp index c5fb92bbd..7ea5ab260 100644 --- a/src/storage/dd/CuddDd.cpp +++ b/src/storage/dd/CuddDd.cpp @@ -388,14 +388,14 @@ namespace storm { std::vector ddNames; std::string ddName("f"); ddNames.push_back(new char[ddName.size() + 1]); - memcpy(ddNames.back(), ddName.c_str(), 2); + std::copy(ddName.c_str(), ddName.c_str() + 2, ddNames.back()); // Now build the variables names. std::vector ddVariableNamesAsStrings = this->getDdManager()->getDdVariableNames(); std::vector ddVariableNames; for (auto const& element : ddVariableNamesAsStrings) { ddVariableNames.push_back(new char[element.size() + 1]); - memcpy(ddVariableNames.back(), element.c_str(), element.size() + 1); + std::copy(element.c_str(), element.c_str() + element.size() + 1, ddVariableNames.back()); } // Open the file, dump the DD and close it again.