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:
@@ -241,7 +241,7 @@ void SGCannon::GameOverTimerFunc(Entity* self) {
|
||||
|
||||
void SGCannon::DoSpawnTimerFunc(Entity* self, const std::string& name) {
|
||||
if (self->GetVar<bool>(GameStartedVariable)) {
|
||||
const auto spawnNumber = static_cast<uint32_t>(std::stoi(name.substr(7)));
|
||||
const auto spawnNumber = GeneralUtils::TryParse(name.substr(7), 0);
|
||||
const auto& activeSpawns = self->GetVar<std::vector<SGEnemy>>(ActiveSpawnsVariable);
|
||||
if (activeSpawns.size() <= spawnNumber) {
|
||||
LOG_DEBUG("Trying to spawn %i when spawns size is only %i", spawnNumber, activeSpawns.size());
|
||||
|
||||
Reference in New Issue
Block a user