mirror of
https://github.com/glfw/glfw.git
synced 2025-07-29 11:00:04 +00:00
win32_window.c: don't memset the whole buffer
This commit is contained in:
parent
af115856d4
commit
931097811c
@ -730,12 +730,12 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
|||||||
// Retrieve the names of the dropped objects
|
// Retrieve the names of the dropped objects
|
||||||
int count = DragQueryFile(hDrop, 0xFFFFFFFF, szName, MAX_PATH);
|
int count = DragQueryFile(hDrop, 0xFFFFFFFF, szName, MAX_PATH);
|
||||||
char s[MAX_PATH*count];
|
char s[MAX_PATH*count];
|
||||||
memset(s,0,sizeof(s));
|
s[0] = 0;
|
||||||
int i;
|
int i;
|
||||||
for(i = 0; i < count; i++)
|
for(i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
DragQueryFile(hDrop, i, szName, MAX_PATH);
|
DragQueryFile(hDrop, i, szName, MAX_PATH);
|
||||||
char* utf8str = _glfwCreateUTF8FromWideString((const wchar_t*)szName)
|
char* utf8str = _glfwCreateUTF8FromWideString((const wchar_t*)szName);
|
||||||
strcat(s, utf8str);
|
strcat(s, utf8str);
|
||||||
strcat(s, "\n");
|
strcat(s, "\n");
|
||||||
free(utf8str);
|
free(utf8str);
|
||||||
|
Loading…
Reference in New Issue
Block a user