diff --git a/src/org/netpreserve/jwarc/tools/ValidateTool.java b/src/org/netpreserve/jwarc/tools/ValidateTool.java index d885607..a569948 100644 --- a/src/org/netpreserve/jwarc/tools/ValidateTool.java +++ b/src/org/netpreserve/jwarc/tools/ValidateTool.java @@ -91,7 +91,7 @@ private static long readBody(MessageBody body, Consumer consumer) th private static void validateDigest(WarcDigest digestExpected, WarcDigest digestCalculated, long size) throws DigestException { - if (!digestCalculated.equals(digestCalculated)) { + if (!digestExpected.equals(digestCalculated)) { throw new java.security.DigestException("Failed to validate digest: expected " + digestExpected + ", got " + digestCalculated + " (on " + size + " bytes)"); }