diff --git a/src/r_data.c b/src/r_data.c
index 7bad6bb897b6e379d480de67d00bcf704b14a9a9..4066ca6485a7bb1d5691ac8e4d6fe8ebfe5ec755 100644
--- a/src/r_data.c
+++ b/src/r_data.c
@@ -944,12 +944,12 @@ static void R_InitExtraColormaps(void)
 	for (cfile = clump = 0; cfile < numwadfiles; cfile++, clump = 0)
 	{
 		startnum = W_CheckNumForNamePwad("C_START", cfile, clump);
-		if (startnum == LUMPERROR)
+		if (startnum == INT16_MAX)
 			continue;
 
 		endnum = W_CheckNumForNamePwad("C_END", cfile, clump);
 
-		if (endnum == LUMPERROR)
+		if (endnum == INT16_MAX)
 			I_Error("R_InitExtraColormaps: C_START without C_END\n");
 
 		if (WADFILENUM(startnum) != WADFILENUM(endnum))