]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
"SanskritFritz" points out that digits at the start of RTF pastes were being
authorJacob Nevins <jacobn@chiark.greenend.org.uk>
Thu, 9 Jun 2005 10:05:29 +0000 (10:05 +0000)
committerJacob Nevins <jacobn@chiark.greenend.org.uk>
Thu, 9 Jun 2005 10:05:29 +0000 (10:05 +0000)
eaten by the trailing "\f0" on the RTF preamble. The RTF spec (1.0 and 1.6)
suggests that adding a space should defuse this situation and be otherwise
harmless, and it works for me (Win98).

[originally from svn r5931]

windows/window.c

index 614808a949ca9c3a4194cd96682de773f2e77192..a37ac4884f8942a94a401e0ee1bb52bde733091f 100644 (file)
@@ -4513,7 +4513,7 @@ void write_clip(void *frontend, wchar_t * data, int len, int must_deselect)
 
        rtfsize = 100 + strlen(cfg.font.name);
        rtf = snewn(rtfsize, char);
-       sprintf(rtf, "{\\rtf1\\ansi%d{\\fonttbl\\f0\\fmodern %s;}\\f0",
+       sprintf(rtf, "{\\rtf1\\ansi%d{\\fonttbl\\f0\\fmodern %s;}\\f0 ",
                GetACP(), cfg.font.name);
        rtflen = strlen(rtf);