aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-07-09 10:53:38 +0200
committerGravatar Christian Hesse <mail@eworm.de>2013-07-09 10:53:38 +0200
commit50c976f115d2ee0daa233f393b0f5b08213214d6 (patch)
treebcedecefae450f4c6b3594a48f88b6f5280c4422
parent5ff2f7acd636131a6b94bc44cbcef2dd02dd4e43 (diff)
downloadnthash-50c976f115d2ee0daa233f393b0f5b08213214d6.tar.gz
nthash-50c976f115d2ee0daa233f393b0f5b08213214d6.tar.zst
print last byte as well...0.1.2
-rw-r--r--Makefile2
-rw-r--r--nthash.c2
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');