diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-02-09 00:19:58 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-02-09 00:19:58 +0100 |
commit | c374807e9d73014ce57eacbbaa56e05460288368 (patch) | |
tree | af9974aa6b03c9e25c9e42c108d9f25277665b41 /strbuf.c | |
parent | Fix minor memmory error. (diff) | |
download | calp-c374807e9d73014ce57eacbbaa56e05460288368.tar.gz calp-c374807e9d73014ce57eacbbaa56e05460288368.tar.xz |
Extend parsing to handle tree's of vcomponents.
Diffstat (limited to 'strbuf.c')
-rw-r--r-- | strbuf.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -82,6 +82,12 @@ int strbuf_copy(strbuf* dest, strbuf* src) { } int strbuf_cmp(strbuf* a, strbuf* b) { +#ifdef SAFE_STR + if (a->alloc == 0 || b->alloc == 0) { + ERR("a or b not alloced"); + return -1; + } +#endif return strcmp(a->mem, b->mem); } |