diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-06-09 11:21:39 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-06-09 11:21:39 +0200 |
commit | ca812456b590d349f4c15a972ecc444d5b27c5ec (patch) | |
tree | 655b30004a6309192b0355213fee1f480fb7f09c | |
parent | fb29f653b0d3868a8dde08ebf4689acd314eaa4d (diff) |
Remember to NULL-terminate in strszero()
-rw-r--r-- | cbs.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -188,6 +188,8 @@ void strszero(struct strs *xs) { xs->len = 0; + if (xs->cap > 0) + xs->buf[0] = NULL; } void |