22 May
2023
22 May
'23
3:56 p.m.
Esme Povirk (@madewokherd) commented about dlls/gdiplus/graphics.c:
if(fit == 0) break;
- for(lret = 0; lret < fit; lret++) - if(*(stringdup + sum + lret) == '\n') + for(lret = 0; lret < fit; lret++) { + /* Unix style new line */ + if(*(stringdup + sum + lret) == '\n'){ + unix_newline = TRUE; break; + } + + /* Windows style new line */ + if(*(stringdup + sum + lret) == '\r' && *(stringdup + sum + lret + 1) == '\n'){
This needs to do bounds checking in case the string ends with \r. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2865#note_33405