mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
fix jrpc issue on msvc
This commit is contained in:
parent
60500ff427
commit
351fd6ba62
@ -770,7 +770,7 @@ static char* extract_quoted_string(const char** input) {
|
||||
if (!result) {
|
||||
return NULL;
|
||||
}
|
||||
strncpy(result, start, len);
|
||||
memcpy(result, start, len);
|
||||
result[len] = '\0';
|
||||
*input = end + 1;
|
||||
return result;
|
||||
@ -837,7 +837,7 @@ char* JRPC_cmd(JRPC* jrpc, const char* cmd) {
|
||||
jrpc_debug("Failed to allocate memory for token_param\n");
|
||||
goto __exit;
|
||||
}
|
||||
strncpy(token_param, start, len);
|
||||
memcpy(token_param, start, len);
|
||||
token_param[len] = '\0';
|
||||
|
||||
param = cJSON_Parse(token_param);
|
||||
|
@ -770,7 +770,7 @@ static char* extract_quoted_string(const char** input) {
|
||||
if (!result) {
|
||||
return NULL;
|
||||
}
|
||||
strncpy(result, start, len);
|
||||
memcpy(result, start, len);
|
||||
result[len] = '\0';
|
||||
*input = end + 1;
|
||||
return result;
|
||||
@ -837,7 +837,7 @@ char* JRPC_cmd(JRPC* jrpc, const char* cmd) {
|
||||
jrpc_debug("Failed to allocate memory for token_param\n");
|
||||
goto __exit;
|
||||
}
|
||||
strncpy(token_param, start, len);
|
||||
memcpy(token_param, start, len);
|
||||
token_param[len] = '\0';
|
||||
|
||||
param = cJSON_Parse(token_param);
|
||||
|
@ -2,4 +2,4 @@
|
||||
#define PIKA_VERSION_MINOR 13
|
||||
#define PIKA_VERSION_MICRO 3
|
||||
|
||||
#define PIKA_EDIT_TIME "2024/07/15 17:00:25"
|
||||
#define PIKA_EDIT_TIME "2024/07/20 23:52:55"
|
||||
|
Loading…
x
Reference in New Issue
Block a user