Skip to content

Commit

Permalink
Assert against arguments which would invoke UB
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisThrasher committed Sep 17, 2024
1 parent d26c691 commit 3826091
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/CSFML/Network/IpAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const sfIpAddress sfIpAddress_Broadcast = sfIpAddress_fromBytes(255, 255, 255, 2
////////////////////////////////////////////////////////////
sfIpAddress sfIpAddress_fromString(const char* address)
{
assert(address);
return fromSFMLAddress(sf::IpAddress::resolve(address));
}

Expand Down
1 change: 1 addition & 0 deletions src/CSFML/Window/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ void sfContext_destroy(const sfContext* context)
////////////////////////////////////////////////////////////
bool sfContext_isExtensionAvailable(const char* name)
{
assert(name);
return sf::Context::isExtensionAvailable(name);
}

Expand Down

0 comments on commit 3826091

Please sign in to comment.