-
-
Notifications
You must be signed in to change notification settings - Fork 127
Closed
Description
this function in CSFML Font.cpp
sfFont* sfFont_createFromFile(const char* filename)
{
sf::Font font;
if (!font.openFromFile(filename)) // implicitly construct std::filesystem::path from filename
return nullptr;
return new sfFont{std::move(font), {}, {}};
}I cannot find from cppreference whether it is UB or not to pass nullptr to std::filesystem::path so I looked into libstdc++ and when you pass a const char* into std::filesystem::path it will construct a path::string_type (alias to std::string) which is UB to pass nullptr for.
functions
SoundBuffer.cpp
1
Image.cpp
1
Font.cpp
1
Music.cpp
1
ChrisThrasher