Always allocate zt in output of SDL_iconv_string()

Before this, the function could not be used on buffers,
as it would not account for the zero-termination unless
it was included in the input.
This commit is contained in:
Eddy Jansson authored and Sam Lantinga committed 2023-02-28 09:26:01 -08:00
1 parent 5fb5586233
commit 5f5abb6805
2 files changed
+4 -3

No files matched your search

+1 -1
View File
@@ -662,7 +662,7 @@ extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf,
size_t * outbytesleft);
/**
* This function converts a string between encodings in one pass, returning a
* This function converts a buffer or string between encodings in one pass, returning a
* string that must be freed with SDL_free() or NULL on error.
*
* \since This function is available since SDL 3.0.0.