Closed IronBlood closed 10 years ago
可能前几次访问是好的,推迟到 DP-1027 交付包吧。
@Liu-Ameng 求 code review
问题大概出现在 api_template.c
的这么几个方法上:
static char *template_string_replace(char *ori, const char *old, const char *new)
void api_template_set(api_template_t *tpl, const char *key, char *fmt, ...)
api_user.c
的 int api_user_query(ONION_FUNC_PROTO_STR)
只调用了四次 api_template_set
,貌似适当的注释,有时候会出现 memory corruption 错误,某些不会。
辛苦啦 :-)
onion 自带了一套模板引擎 otemplate,语法基于 django template。可以研究看看。
看起来是吧 *.html
文件 转成 *.c
,看起来需要把模板编译到程序里头。
@Liu-Ameng 好奇怪,login 的方法中倒是没出错。。。
最终发现是因为下标越界,字符数组未能正确结束。
修正方案: bmybbs/api@25e99d23d7336305785c7f558d1204c6e2c8da39
花费时间: 24hour
我用 git reset 命令回退了版本,@Liu-Ameng 同学重新提交一次吧,另外有个全局的 git 配置。
git config --global push.default simple
updated commit links: bmybbs/api@25e99d23d7336305785c7f558d1204c6e2c8da39
Re @IronBlood
开搞版面帖子列表~
user/query
运行时错误