mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48: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:
parent
787fcd3eb7
commit
58c9d21f58
@ -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
|
* Copyright (c) 2003 Ben Harris
|
||||||
* All rights reserved.
|
* 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].region < 0 || macencs[i].region == region) &&
|
||||||
(macencs[i].sysvermin <= sysvers) &&
|
(macencs[i].sysvermin <= sysvers) &&
|
||||||
(macencs[i].fontname == NULL ||
|
(macencs[i].fontname == NULL ||
|
||||||
strcmp(macencs[i].fontname, fontname) == 0))
|
(fontname != NULL && strcmp(macencs[i].fontname, fontname) == 0)))
|
||||||
return macencs[i].charset;
|
return macencs[i].charset;
|
||||||
|
|
||||||
return CS_NONE;
|
return CS_NONE;
|
||||||
|
Loading…
Reference in New Issue
Block a user