[Patch by Kelvin Delbarre]

Fixes copy/paste errors in the Windows version of SheepShaver, wherein pasted
text would have a trailing null character or extra garbage after the end.
This commit is contained in:
asvitkine 2009-04-14 15:17:03 +00:00
parent 9c8387f8d0
commit 6db0c7453b

View File

@ -231,6 +231,8 @@ static void do_getscrap(void **handle, uint32 type, int32 offset)
for (int i = 0; i < length; i++) {
uint8 c = data[i];
if (c < 0x80) {
if (c == 0)
break;
if (c == 13 && i < length - 1 && data[i + 1] == 10) { // CR/LF -> CR
c = 13;
i++;