1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Fix two accidental overwrites of 'flags'.

When I came to actually remove the global 'flags' word, I found that I
got compile failures in two functions that should never have been
accessing it at all, because they forgot to declare _local_ variables
of the same name. Yikes!

(Of course, _now_ that's harmless, because I've just removed all the
actual semantics from the global variable. But I'm about to remove the
variable too, so these bugs would become compile failures.)

(cherry picked from commit 33715c07e3)
This commit is contained in:
Simon Tatham 2020-01-30 06:40:21 +00:00
parent 5b09e4c250
commit fe732487ad
2 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@ struct sftp_packet *sftp_handle_request(
{
struct sftp_packet *reply;
unsigned id;
uint32_t flags;
ptrlen path, dstpath, handle, data;
uint64_t offset;
unsigned length;

View File

@ -1107,7 +1107,7 @@ static void x11font_enum_fonts(GtkWidget *widget,
* font, which we do by examining the spacing field
* again.
*/
flags = FONTFLAG_SERVERSIDE;
int flags = FONTFLAG_SERVERSIDE;
if (!strchr("CcMm", xlfd->spacing[0]))
flags |= FONTFLAG_NONMONOSPACED;