From 6db0c7453bc7224b15976ca0cd735e32e87761fa Mon Sep 17 00:00:00 2001 From: asvitkine <> Date: Tue, 14 Apr 2009 15:17:03 +0000 Subject: [PATCH] [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. --- BasiliskII/src/Windows/clip_windows.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BasiliskII/src/Windows/clip_windows.cpp b/BasiliskII/src/Windows/clip_windows.cpp index 44be8156..eab99f2f 100755 --- a/BasiliskII/src/Windows/clip_windows.cpp +++ b/BasiliskII/src/Windows/clip_windows.cpp @@ -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++;