Zebediah Figura (@zfigura) commented about dlls/user32/msgbox.c:
+ /* + --------------------------- + Dialog Title + --------------------------- + Dialog Message + --------------------------- + Button(s) Text. OK + --------------------------- + */ + int len = ((wcslen(carriage) * 3) + (wcslen(line) * 4) + lenTitle + lenMsg) * sizeof(WCHAR); + WCHAR *text = heap_alloc(len); + if(text) + { + lstrcpyW(text, line); + if (GetWindowTextW(hwnd, text + lstrlenW(text), lenTitle)) + { Early return here, and in other places in this patch, would save a level of indentation.
Also, the spacing is very inconsistent; some places have "if(", others "if (". Generally the latter is preferred. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5247#note_64998