shithub: mc

Download patch

ref: 0fd30aacbeb4f4f149e30b538e68c30f0f65c110
parent: 7232ece6a83f28173aff8be16b201151ad7d3751
author: Andrew Chambers <andrewchamberss@gmail.com>
date: Tue Mar 8 16:40:48 EST 2016

compare the correct memory in strliteq

--- a/util/htab.c
+++ b/util/htab.c
@@ -265,7 +265,7 @@
 		return 0;
 	if (a->len != b->len)
 		return 0;
-	return !memcmp(a, b, a->len);
+	return !memcmp(a->buf, b->buf, a->len);
 }
 
 ulong ptrhash(void *key) { return inthash((uintptr_t)key); }