"SanskritFritz" points out that digits at the start of RTF pastes were being
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Thu, 9 Jun 2005 10:05:29 +0000 (10:05 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
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).

git-svn-id: svn://svn.tartarus.org/sgt/putty@5931 cda61777-01e9-0310-a592-d414129be87e

windows/window.c

index 614808a..a37ac48 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);