mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-02-04 06:02:24 +00:00
Use c2pstrcpy() rather than silly sprintf() tricks.
[originally from svn r2523]
This commit is contained in:
parent
76a43ad512
commit
34a96d4924
@ -1,4 +1,4 @@
|
|||||||
/* $Id: macterm.c,v 1.37 2003/01/09 22:45:48 ben Exp $ */
|
/* $Id: macterm.c,v 1.38 2003/01/09 22:51:41 ben Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999 Simon Tatham
|
* Copyright (c) 1999 Simon Tatham
|
||||||
* Copyright (c) 1999, 2002 Ben Harris
|
* Copyright (c) 1999, 2002 Ben Harris
|
||||||
@ -238,7 +238,7 @@ static void mac_initfont(Session *s) {
|
|||||||
OptionBits fbflags;
|
OptionBits fbflags;
|
||||||
|
|
||||||
SetPort(s->window);
|
SetPort(s->window);
|
||||||
macfont[0] = sprintf((char *)&macfont[1], "%s", s->cfg.font);
|
c2pstrcpy(macfont, s->cfg.font);
|
||||||
GetFNum(macfont, &s->fontnum);
|
GetFNum(macfont, &s->fontnum);
|
||||||
TextFont(s->fontnum);
|
TextFont(s->fontnum);
|
||||||
TextFace(s->cfg.fontisbold ? bold : 0);
|
TextFace(s->cfg.fontisbold ? bold : 0);
|
||||||
@ -1269,7 +1269,7 @@ void set_title(void *frontend, char *title) {
|
|||||||
Session *s = frontend;
|
Session *s = frontend;
|
||||||
Str255 mactitle;
|
Str255 mactitle;
|
||||||
|
|
||||||
mactitle[0] = sprintf((char *)&mactitle[1], "%s", title);
|
c2pstrcpy(mactitle, title);
|
||||||
SetWTitle(s->window, mactitle);
|
SetWTitle(s->window, mactitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user