mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 21:36:13 +01:00
Assert against arguments which would invoke UB
This commit is contained in:
1 parent
d26c691458
commit
3826091357
2 files changed
+2
No files matched your search
@@ -74,6 +74,7 @@ const sfIpAddress sfIpAddress_Broadcast = sfIpAddress_fromBytes(255, 255, 255, 2
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
sfIpAddress sfIpAddress_fromString(const char* address)
|
sfIpAddress sfIpAddress_fromString(const char* address)
|
||||||
{
|
{
|
||||||
|
assert(address);
|
||||||
return fromSFMLAddress(sf::IpAddress::resolve(address));
|
return fromSFMLAddress(sf::IpAddress::resolve(address));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ void sfContext_destroy(const sfContext* context)
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
bool sfContext_isExtensionAvailable(const char* name)
|
bool sfContext_isExtensionAvailable(const char* name)
|
||||||
{
|
{
|
||||||
|
assert(name);
|
||||||
return sf::Context::isExtensionAvailable(name);
|
return sf::Context::isExtensionAvailable(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user