diff options
Diffstat (limited to 'cstring')
-rw-r--r-- | cstring/include/cstring.h | 2 | ||||
-rw-r--r-- | cstring/src/cstring.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cstring/include/cstring.h b/cstring/include/cstring.h index 3e693e1..c24cd35 100644 --- a/cstring/include/cstring.h +++ b/cstring/include/cstring.h | |||
@@ -75,7 +75,7 @@ static inline void cstring_copy(char* dst, const char* src, size_t count) { | |||
75 | static inline void STRING##_append_cstr_len( \ | 75 | static inline void STRING##_append_cstr_len( \ |
76 | STRING* a, const char* b, const size_t b_length) { \ | 76 | STRING* a, const char* b, const size_t b_length) { \ |
77 | ASSERT(a->length + b_length + 1 <= SIZE); \ | 77 | ASSERT(a->length + b_length + 1 <= SIZE); \ |
78 | cstring_copy(a->str + a->length, b, SIZE - a->length); \ | 78 | cstring_copy(a->str + a->length, b, b_length); \ |
79 | a->length += b_length; \ | 79 | a->length += b_length; \ |
80 | } \ | 80 | } \ |
81 | \ | 81 | \ |
diff --git a/cstring/src/cstring.c b/cstring/src/cstring.c index e308589..100c130 100644 --- a/cstring/src/cstring.c +++ b/cstring/src/cstring.c | |||
@@ -23,7 +23,7 @@ string string_new(const char* cstr) { | |||
23 | void string_del(string* str) { | 23 | void string_del(string* str) { |
24 | if (str->data) { | 24 | if (str->data) { |
25 | free((void*)str->data); | 25 | free((void*)str->data); |
26 | str->data = 0; | 26 | str->data = nullptr; |
27 | str->length = 0; | 27 | str->length = 0; |
28 | } | 28 | } |
29 | } | 29 | } |