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

Don't pass NULL to strcmp. Instead, if the user passes a font of NULL,

only match table entries where the font is NULL.

[originally from svn r2725]
This commit is contained in:
Ben Harris 2003-01-25 19:21:56 +00:00
parent 787fcd3eb7
commit 58c9d21f58

View File

@ -1,4 +1,4 @@
/* $Id: macenc.c,v 1.1 2003/01/01 19:51:12 ben Exp $ */
/* $Id: macenc.c,v 1.2 2003/01/25 19:21:56 ben Exp $ */
/*
* Copyright (c) 2003 Ben Harris
* All rights reserved.
@ -162,7 +162,7 @@ int charset_from_macenc(int script, int region, int sysvers,
(macencs[i].region < 0 || macencs[i].region == region) &&
(macencs[i].sysvermin <= sysvers) &&
(macencs[i].fontname == NULL ||
strcmp(macencs[i].fontname, fontname) == 0))
(fontname != NULL && strcmp(macencs[i].fontname, fontname) == 0)))
return macencs[i].charset;
return CS_NONE;