mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-10-26 22:10:06 +00:00
set moved-from ip to explicitly obvious moved-from string
This commit is contained in:
1 file changed
+2
@@ -45,6 +45,8 @@ TConnectionLimiter::TGuard& TConnectionLimiter::TGuard::operator=(TGuard&& other
|
|||||||
mOwner = other.mOwner;
|
mOwner = other.mOwner;
|
||||||
mIp = std::move(other.mIp);
|
mIp = std::move(other.mIp);
|
||||||
other.mOwner = nullptr;
|
other.mOwner = nullptr;
|
||||||
|
// setting this so its obvious when this happens, instead of being UB or empty string
|
||||||
|
other.mIp = "<moved-from>";
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user