mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-20 00:31:28 +00:00
[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:
parent
9c8387f8d0
commit
6db0c7453b
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user