mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
use strGetSize instead of buffsize in obj_getObj
This commit is contained in:
parent
a998fddaf7
commit
76bed7951b
@ -368,8 +368,8 @@ PikaObj* obj_getObjDirect(PikaObj* self, char* name) {
|
||||
}
|
||||
|
||||
PikaObj* obj_getObj(PikaObj* self, char* objPath, int32_t keepDeepth) {
|
||||
static char objPath_buff[PIKA_CONFIG_PATH_BUFF_SIZE];
|
||||
__platform_memcpy(objPath_buff, objPath, sizeof(objPath_buff));
|
||||
char objPath_buff[PIKA_CONFIG_PATH_BUFF_SIZE];
|
||||
__platform_memcpy(objPath_buff, objPath, strGetSize(objPath) + 1);
|
||||
char token_buff[PIKA_CONFIG_NAME_BUFF_SIZE] = {0};
|
||||
int32_t token_num = strGetTokenNum(objPath, '.');
|
||||
PikaObj* obj = self;
|
||||
|
Loading…
x
Reference in New Issue
Block a user