Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/CSFML/Network/Ftp.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ CSFML_NETWORK_API const char* sfFtpDirectoryResponse_getMessage(const sfFtpDirec
///
/// \param ftpDirectoryResponse Ftp directory response
///
/// \return Directory name
/// \return Directory name or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_NETWORK_API const char* sfFtpDirectoryResponse_getDirectory(const sfFtpDirectoryResponse* ftpDirectoryResponse);
Expand All @@ -239,7 +239,7 @@ CSFML_NETWORK_API const char* sfFtpDirectoryResponse_getDirectory(const sfFtpDir
///
/// \param ftpDirectoryResponse Ftp directory response
///
/// \return Directory name
/// \return Directory name or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_NETWORK_API const sfChar32* sfFtpDirectoryResponse_getDirectoryUnicode(const sfFtpDirectoryResponse* ftpDirectoryResponse);
Expand Down
2 changes: 2 additions & 0 deletions src/CSFML/Network/Ftp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ static_assert(alignof(sfChar32) == alignof(char32_t));
{
const std::size_t byteCount = sizeof(sfChar32) * str.getSize();
auto* utf32 = static_cast<sfChar32*>(std::malloc(byteCount + sizeof(sfChar32)));
if (!utf32)
return nullptr;
std::memcpy(utf32, str.getData(), byteCount);
utf32[str.getSize()] = 0;

Expand Down