Esme Povirk (@madewokherd) commented about dlls/gdiplus/graphics.c:
&& *(stringdup + sum + lret + 1) == '\n') { unixstyle_newline = FALSE;
lret += 2; break; } } /* Line break code (may look strange, but it imitates windows). */
if(lret < fit)
lineend = fit = lret; /* this is not an off-by-one error */
if(lret > 0 && *(stringdup + sum + lret - 1) == '\n')
I don't like this as a condition, and there's a later `lret == fitcpy` check that's missed. I think I'd rather see these lret/fit[cpy] comparisons replaced with a boolean variable for whether a newline was encountered.