Gabriel Ivăncescu (@insn) commented about dlls/comdlg32/navbar.c:
break;if (!GetWindowTextW(info->pathedit_hwnd, text, text_len + 1))goto cleanup;ptr = text + caret_pos;end = StrDupW(ptr);if (!end)goto cleanup;word_break_proc = (EDITWORDBREAKPROCW)SendMessageW(info->pathedit_hwnd, EM_GETWORDBREAKPROC, 0, 0);caret_pos = word_break_proc(text, caret_pos, text_len, WB_LEFT);ptr = text + caret_pos;*ptr = '\0';lstrcatW(ptr, end);
Why not just `wcscpy(ptr, end)`?