mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-01 21:33:04 +00:00
If passed catgets descriptor is NULL or -1, return default string immediately
This commit is contained in:
parent
9ad256ad65
commit
e97ef24c18
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=35550
@ -1,4 +1,4 @@
|
||||
/* $Id: msgcat.c,v 1.14 1998/04/30 11:06:12 ache Exp $ */
|
||||
/* $Id: msgcat.c,v 1.15 1998/04/30 11:39:08 ache Exp $ */
|
||||
|
||||
/***********************************************************
|
||||
Copyright 1990, by Alfalfa Software Incorporated, Cambridge, Massachusetts.
|
||||
@ -257,6 +257,8 @@ __const char *dflt;
|
||||
MCCatT *cat = (MCCatT *) catd;
|
||||
__const char *cptr;
|
||||
|
||||
if (catd == NULL || catd == NLERR)
|
||||
return((char *)dflt);
|
||||
msg = MCGetMsg(MCGetSet(cat, setId), msgId);
|
||||
if (msg) cptr = msg->msg.str;
|
||||
else cptr = dflt;
|
||||
|
Loading…
Reference in New Issue
Block a user