Fixed sign/unsigned comparisions.

This commit is contained in:
Bart House
2019-07-12 18:37:33 -07:00
parent 0ca299acb3
commit 0e8e5aac93
2 changed files with 3 additions and 3 deletions

View File

@@ -1143,10 +1143,10 @@ struct monst *mtmp;
sent out of his room (caller might resort to goodpos() if sent out of his room (caller might resort to goodpos() if
we report failure here, so this isn't full prevention) */ we report failure here, so this isn't full prevention) */
if (mtmp->isshk && inhishop(mtmp)) { if (mtmp->isshk && inhishop(mtmp)) {
if (levl[x][y].roomno != ESHK(mtmp)->shoproom) if (levl[x][y].roomno != (unsigned char) ESHK(mtmp)->shoproom)
return FALSE; return FALSE;
} else if (mtmp->ispriest && inhistemple(mtmp)) { } else if (mtmp->ispriest && inhistemple(mtmp)) {
if (levl[x][y].roomno != EPRI(mtmp)->shroom) if (levl[x][y].roomno != (unsigned char) EPRI(mtmp)->shroom)
return FALSE; return FALSE;
} }
/* current location is <xx,yy> */ /* current location is <xx,yy> */

View File

@@ -259,7 +259,7 @@ register const char *bp;
&& cw->cury == 0 && cw->cury == 0
&& n0 + (int) strlen(toplines) + 3 < CO - 8 /* room for --More-- */ && n0 + (int) strlen(toplines) + 3 < CO - 8 /* room for --More-- */
&& (notdied = strncmp(bp, "You die", 7)) != 0) { && (notdied = strncmp(bp, "You die", 7)) != 0) {
nhassert(strlen(toplines) == cw->curx); nhassert((long) strlen(toplines) == cw->curx);
Strcat(toplines, " "); Strcat(toplines, " ");
Strcat(toplines, bp); Strcat(toplines, bp);
cw->curx += 2; cw->curx += 2;