Fix dstr_end bug (it's len - 1)

Somewhat of an embarassing fix.  Using 'len' will just return the null
terminator.
This commit is contained in:
jp9000
2014-07-23 20:16:37 -07:00
parent dc42ac0012
commit 6d89dde0da
+1 -1
View File
@@ -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