diff --git a/src/dstr.c b/src/dstr.c index 9c64fa2..9c12e8a 100644 --- a/src/dstr.c +++ b/src/dstr.c @@ -65,9 +65,11 @@ int uc_dstr_ensure(struct DStr *str, size_t total) void uc_dstr_reset(struct DStr *str) { str->len = 0; +#ifdef DEBUG if (str->str) { - str->str[0] = 0; + memset(str->str, 0xcc, str->allocated); } +#endif } void uc_dstr_terminate(struct DStr *str)