-void cstring_expand_arr(cstring_t *self, char *x) {
- if(self->size + strlen(x) + sizeof(char) > self->alloc) {
- self->alloc = ((strlen(x) + self->size + 1) * sizeof(char));
- if((self->text = realloc(self->text, self->alloc)) == NULL) {
- fprintf(stderr, "%s\n", "cstring_expand() failed to reallocate memory.");
+void cstring_expand_arr(cstring_t *self, wchar_t *x) {
+ if((self->size + wcslen(x) + 1) * sizeof(wchar_t) > self->alloc) {
+ self->alloc = ((self->size + wcslen(x) + 1) * sizeof(wchar_t));
+ if((self->value = realloc(self->value, self->alloc)) == NULL) {
+ fprintf(stderr, "%s\n", "cstring_expand_arr() failed to reallocate memory.");