fix str_set_with_len

This commit is contained in:
xianjimli 2020-02-29 07:09:04 +08:00
parent 227b36914c
commit 517e6b0fd6

View File

@ -79,6 +79,7 @@ ret_t str_set_with_len(str_t* str, const char* text, uint32_t len) {
tk_strncpy(str->str, text, size);
str->size = size;
str->str[str->size] = '\0';
return RET_OK;
}