提交 6d89dde0 编写于 作者: J jp9000

Fix dstr_end bug (it's len - 1)

Somewhat of an embarassing fix.  Using 'len' will just return the null
terminator.
上级 dc42ac00
......@@ -313,7 +313,7 @@ static inline char dstr_end(const struct dstr *str)
if (dstr_isempty(str))
return 0;
return str->array[str->len];
return str->array[str->len - 1];
}
#ifdef __cplusplus
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册