diff options
| author | Yuri Safonov <polosatyi@gmail.com> | 2015-05-18 07:06:27 +0000 |
|---|---|---|
| committer | Yuri Safonov <polosatyi@gmail.com> | 2015-05-18 07:06:27 +0000 |
| commit | 1af9f74ebc396b079587c06305aa7ad886a53e81 (patch) | |
| tree | 5a560b48d099f22c5131bf45f7c0afe236a2ce2d /emu/Nt/win.c | |
| parent | 19c1b9563e510e86f2b7b53748f60f8ac761e845 (diff) | |
Fix Issue #303 ("Snarf" and "Cut" get only the first symbol)
Diffstat (limited to 'emu/Nt/win.c')
| -rw-r--r-- | emu/Nt/win.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/emu/Nt/win.c b/emu/Nt/win.c index 4eb56f45..167b2787 100644 --- a/emu/Nt/win.c +++ b/emu/Nt/win.c @@ -752,7 +752,7 @@ int clipwrite(char *buf) { HANDLE h; - char *p, *e; + char *p; Rune *rp; int n; @@ -771,11 +771,7 @@ clipwrite(char *buf) if(h == NULL) error(Enovmem); rp = GlobalLock(h); - p = buf; - e = p+n; - while(p<e) - p += chartorune(rp++, p); - *rp = 0; + utftorunes16(rp, buf, (n+1)*sizeof(Rune)); GlobalUnlock(h); SetClipboardData(CF_UNICODETEXT, h); |
