diff --git a/ChangeLog b/ChangeLog
index 79cdb07cebe1748fd7ce25fff059c90faf61174b..b42e290b1325b890d55e1cd196425d346a456139 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -59,6 +59,10 @@ CVS code -
 	  of 0 to get a string as long as we need is a nonportable GNU
 	  extension, and hence it won't work on non-GNU systems that
 	  don't define PATH_MAX. (DLR)
+- rcfile.c:
+  parse_rcfile()
+	- Fix debugging message to display the long value of a flag
+	  properly. (DLR)
 - utils.c:
   regexec_safe()
 	- Rename to safe_regexec() for consistency. (DLR)
diff --git a/src/rcfile.c b/src/rcfile.c
index 377fb2260ccdff93dd599c4ba9d3a90cba8d9145..9d0be640510e00512066e3ab0c60c1e91c43c1a7 100644
--- a/src/rcfile.c
+++ b/src/rcfile.c
@@ -650,7 +650,7 @@ void parse_rcfile(FILE *rcstream)
 			    assert(FALSE);
 		    }
 #ifdef DEBUG
-		    fprintf(stderr, "flag = %d\n", rcopts[i].flag);
+		    fprintf(stderr, "flag = %ld\n", rcopts[i].flag);
 #endif
 		} else if (rcopts[i].flag != 0)
 		    UNSET(rcopts[i].flag);