Fix bug of strcpy to wrong place during realloc

This commit is contained in:
Aoran Zeng
2023-09-02 23:11:22 +08:00
parent 1d34248a1e
commit 251ea5c827
3 changed files with 22 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
* File : test_helper.c
* Authors : Aoran Zeng <ccmywish@qq.com>
* Created on : <2023-08-30>
* Last modified : <2023-08-30>
* Last modified : <2023-09-02>
*
* test_helper:
*
@@ -18,8 +18,9 @@ main (int argc, char const *argv[])
xy_useutf8();
puts(xy_2strjoin("Xi", "'an"));
puts(xy_strjoin (2, "Xi", "'an"));
puts(xy_strjoin(3, "中文输出", " XiangYang", " shan shui"));
puts(xy_strjoin(4, "中文输出2", " XianYan", " hao", " feng jing"));
puts(xy_strjoin(3, "屈身守分,", "以待天时,", "不可与命争也"));
puts(xy_strjoin(4, "水落鱼梁浅,", "天寒梦泽深。", "羊公碑字在,", "读罢泪沾襟。"));
puts(xy_strjoin(6, "楚山横地出,", "汉水接天回。", "冠盖非新里,", "章华即旧台。", "习池风景异,", "归路满尘埃。"));
xy_success("成功:输出成功内容");
xy_info("信息: 输出信息内容");