diff --git a/external/md4c.c b/external/md4c.c index 22ab420..73c7b5d 100644 --- a/external/md4c.c +++ b/external/md4c.c @@ -24,7 +24,6 @@ */ #include -#include #include #include #include @@ -5840,7 +5839,7 @@ md_consume_link_reference_definitions(MD_CTX* ctx) MD_LINE* lines = (MD_LINE*) (ctx->current_block + 1); MD_SIZE n_lines = ctx->current_block->n_lines; MD_SIZE n = 0; - bool inject_hr = false; + int inject_hr = 0; OFF ignored; while(n < n_lines) { diff --git a/src/backend/gdi.c b/src/backend/gdi.c index 660a0fc..2013b9a 100644 --- a/src/backend/gdi.c +++ b/src/backend/gdi.c @@ -178,13 +178,14 @@ static LRESULT CALLBACK wndproc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) { for(i = 0; i < count; i++) { wchar_t wpath[MAX_PATH]; - char path[MAX_PATH]; + char* path; wsymtbl.DragQueryFileW(hDrop, i, wpath, MAX_PATH); - memset(path, 0, sizeof(path)); - WideCharToMultiByte(CP_UTF8, 0, wpath, -1, path, sizeof(path) - 1, NULL, NULL); + path = MwUTF16TextToUTF8Text(wpath); MwLLDispatch(u->ll, drag_and_drop, path); + + free(path); } wsymtbl.DragFinish(hDrop); break;