correct sz error when gang parameter is null
This commit is contained in:
@@ -2096,8 +2096,12 @@ const char *gang, *other;
|
|||||||
char buf[BUFSZ], buf2[BUFSZ], *orcname;
|
char buf[BUFSZ], buf2[BUFSZ], *orcname;
|
||||||
|
|
||||||
orcname = rndorcname(buf2);
|
orcname = rndorcname(buf2);
|
||||||
sz = (int) ((gang ? strlen(gang) : other ? strlen(other) : 0)
|
sz = (int) strlen(orcname);
|
||||||
+ strlen(orcname) + sizeof " of " - sizeof "");
|
if (gang)
|
||||||
|
sz += (int) (strlen(gang) + sizeof " of " - sizeof "");
|
||||||
|
else if (other)
|
||||||
|
sz += (int) strlen(other);
|
||||||
|
|
||||||
if (sz < BUFSZ) {
|
if (sz < BUFSZ) {
|
||||||
char gbuf[BUFSZ];
|
char gbuf[BUFSZ];
|
||||||
boolean nameit = FALSE;
|
boolean nameit = FALSE;
|
||||||
|
|||||||
10
src/pager.c
10
src/pager.c
@@ -1353,10 +1353,12 @@ static const char *suptext1[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const char *suptext2[] = {
|
static const char *suptext2[] = {
|
||||||
"%s is a nefarious orc who is known to acquire",
|
"\"%s\" is the common dungeon name of",
|
||||||
"property from thieves and sell it off for profit",
|
"a nefarious orc who is known to acquire property",
|
||||||
"or gain. The perpetrator was last seen hanging",
|
"from thieves and sell it off for profit.",
|
||||||
"around the stairs leading to the Gnomish Mines.",
|
"",
|
||||||
|
"The perpetrator was last seen hanging around the",
|
||||||
|
"stairs leading to the Gnomish Mines.",
|
||||||
(char *) 0,
|
(char *) 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user