Skip to content

Commit 3826091

Browse files
committed
Assert against arguments which would invoke UB
1 parent d26c691 commit 3826091

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/CSFML/Network/IpAddress.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ const sfIpAddress sfIpAddress_Broadcast = sfIpAddress_fromBytes(255, 255, 255, 2
7474
////////////////////////////////////////////////////////////
7575
sfIpAddress sfIpAddress_fromString(const char* address)
7676
{
77+
assert(address);
7778
return fromSFMLAddress(sf::IpAddress::resolve(address));
7879
}
7980

src/CSFML/Window/Context.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ void sfContext_destroy(const sfContext* context)
4747
////////////////////////////////////////////////////////////
4848
bool sfContext_isExtensionAvailable(const char* name)
4949
{
50+
assert(name);
5051
return sf::Context::isExtensionAvailable(name);
5152
}
5253

0 commit comments

Comments
 (0)