31 Jan
2023
31 Jan
'23
2:31 p.m.
On Mon Jan 30 21:04:23 2023 +0000, Vladislav Timonin wrote:
Welp, thought I was having issues with destination overwriting the source, but looks like I was misled as it seem to work just fine. strcat (and its wide variants) is the equivalent of `strcpy(dst + strlen(dst), src)`. You write a NUL first and then use strcat on it, so `strlen(ptr)` is always 0 (since it points to NUL char). Also, you can get rid of the `*ptr = '\0'`, since strcpy will just copy the string directly in its place (where ptr is), that's what I meant.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/1857#note_22463