1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-24 03:25:03 +03:00

Terminate cstr with \0

This commit is contained in:
Tae Won Ha 2020-02-07 18:18:35 +01:00
parent 5ae4f5f232
commit 290988d75c
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44
2 changed files with 2 additions and 2 deletions

View File

@ -379,7 +379,7 @@ static const char *cfstr2cstr(CFStringRef cfstr, bool *free_bytes) {
}
*free_bytes = true;
result[out_len] = NULL;
result[out_len] = '\0';
return result;
}

View File

@ -167,7 +167,7 @@ static const char *cfstr_to_cstr_copy(CFStringRef cfstr) {
return NULL;
}
result[out_len] = NULL;
result[out_len] = '\0';
return result;
}