From e679ad969d45c4bc88ed0f3633ed5b57e5c1c9c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Fri, 6 Dec 2013 21:43:06 +0100 Subject: [PATCH] Add debugging aid to uc_dstr_reset --- src/dstr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)