diff --git a/src/plugins/acct_gather_energy/rapl/acct_gather_energy_rapl.c b/src/plugins/acct_gather_energy/rapl/acct_gather_energy_rapl.c
index a3e839ee775a943ea6faffb541971190661590d9..9650e014ab964fb0dc609e19ee5d72bb7f2c2fb1 100644
--- a/src/plugins/acct_gather_energy/rapl/acct_gather_energy_rapl.c
+++ b/src/plugins/acct_gather_energy/rapl/acct_gather_energy_rapl.c
@@ -248,7 +248,7 @@ static void _hardware(void)
 		if (!xstrncmp(buf, "physical id", sizeof("physical id") - 1)) {
 			sscanf(buf, "physical id\t: %d", &pkg);
 
-			if (pkg > MAX_PKGS)
+			if (pkg >= MAX_PKGS)
 				fatal("Slurm can only handle %d sockets for "
 				      "rapl, you seem to have more than that.  "
 				      "Update src/plugins/acct_gather_energy/"