Cleanup
This commit is contained in:
parent
00b91a07cb
commit
e77a76a284
@ -66,7 +66,7 @@ static char* getDisplayName(CGDirectDisplayID displayID)
|
|||||||
|
|
||||||
size = CFStringGetMaximumSizeForEncoding(CFStringGetLength(value),
|
size = CFStringGetMaximumSizeForEncoding(CFStringGetLength(value),
|
||||||
kCFStringEncodingUTF8);
|
kCFStringEncodingUTF8);
|
||||||
name = calloc(size + 1, sizeof(char));
|
name = calloc(size + 1, 1);
|
||||||
CFStringGetCString(value, name, size, kCFStringEncodingUTF8);
|
CFStringGetCString(value, name, size, kCFStringEncodingUTF8);
|
||||||
|
|
||||||
CFRelease(info);
|
CFRelease(info);
|
||||||
|
@ -377,7 +377,7 @@ char* _glfwCreateUTF8FromWideStringWin32(const WCHAR* source)
|
|||||||
if (!length)
|
if (!length)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
target = calloc(length, sizeof(char));
|
target = calloc(length, 1);
|
||||||
|
|
||||||
if (!WideCharToMultiByte(CP_UTF8, 0, source, -1, target, length, NULL, NULL))
|
if (!WideCharToMultiByte(CP_UTF8, 0, source, -1, target, length, NULL, NULL))
|
||||||
{
|
{
|
||||||
|
@ -120,7 +120,7 @@ void _glfwAddOutputWayland(uint32_t name, uint32_t version)
|
|||||||
struct wl_output *output;
|
struct wl_output *output;
|
||||||
char name_str[80];
|
char name_str[80];
|
||||||
|
|
||||||
memset(name_str, 0, 80 * sizeof(char));
|
memset(name_str, 0, sizeof(name_str));
|
||||||
snprintf(name_str, 79, "wl_output@%u", name);
|
snprintf(name_str, 79, "wl_output@%u", name);
|
||||||
|
|
||||||
if (version < 2)
|
if (version < 2)
|
||||||
|
Loading…
Reference in New Issue
Block a user