Add debugging aid to uc_dstr_reset

This commit is contained in:
Nils O. Selåsdal
2013-12-06 21:43:06 +01:00
parent 20f28273d6
commit e679ad969d
+3 -1
View File
@@ -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)