From 50c976f115d2ee0daa233f393b0f5b08213214d6 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 9 Jul 2013 10:53:38 +0200 Subject: print last byte as well... --- Makefile | 2 +- nthash.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ce6e577..6312cfa 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ all: nthash.c check: $(ECHO) -n "testing123" | ./nthash | \ - $(GREP) '^3e678b266d1d449e531e92bec33b6d27$$' + $(GREP) -q '^3e678b266d1d449e531e92bec33b6d27$$' install: $(INSTALL) -D -m0755 nthash $(DESTDIR)/usr/bin/nthash diff --git a/nthash.c b/nthash.c index 2a8aca0..ac3922a 100644 --- a/nthash.c +++ b/nthash.c @@ -45,7 +45,7 @@ int main(int argc, char **argv) { md4_digest(&ctx, MD4_DIGEST_SIZE, digest); - for (i = 0; i < MD4_DIGEST_SIZE -1; i++) + for (i = 0; i < MD4_DIGEST_SIZE; i++) printf("%02x", digest[i]); putchar('\n'); -- cgit v1.2.3-70-g09d2