mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-06-09 00:04:22 +00:00
fix: security vulnerabilities
Tested that all functions related to the touched files work will test sqlite on a CI build
This commit is contained in:
@@ -66,13 +66,9 @@ const BrickList& BrickDatabase::GetBricks(const LxfmlPath& lxfmlPath) {
|
||||
std::string materialString(materialList);
|
||||
const auto materials = GeneralUtils::SplitString(materialString, ',');
|
||||
|
||||
if (!materials.empty()) {
|
||||
brick.materialID = std::stoi(materials[0]);
|
||||
} else {
|
||||
brick.materialID = 0;
|
||||
}
|
||||
brick.materialID = GeneralUtils::TryParse(materials[0], 0);
|
||||
} else if (materialID != nullptr) {
|
||||
brick.materialID = std::stoi(materialID);
|
||||
brick.materialID = GeneralUtils::TryParse(materialID, 0);
|
||||
} else {
|
||||
brick.materialID = 0; // This is bad, makes it so the minigame can't be played
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user