mirror of
https://github.com/lifegpc/c-utils.git
synced 2026-06-25 21:26:58 +08:00
Fix issue
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
#include <stddef.h>
|
||||||
/**
|
/**
|
||||||
* @brief Copy string to another string
|
* @brief Copy string to another string
|
||||||
* @param dest The pointer of output string
|
* @param dest The pointer of output string
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ bool encoding::iconv_convert(std::string input, std::string& output, std::string
|
|||||||
size_t buf_left = 0;
|
size_t buf_left = 0;
|
||||||
std::string out;
|
std::string out;
|
||||||
size_t avail_in = input.length();
|
size_t avail_in = input.length();
|
||||||
auto in = input.c_str();
|
char* in = (char*)input.c_str();
|
||||||
if (!buf) {
|
if (!buf) {
|
||||||
iconv_close(cd);
|
iconv_close(cd);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user