summaryrefslogtreecommitdiff
path: root/decorate.c
diff options
context:
space:
mode:
Diffstat (limited to 'decorate.c')
-rw-r--r--decorate.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/decorate.c b/decorate.c
index 82d9e22..e6fd8a7 100644
--- a/decorate.c
+++ b/decorate.c
@@ -8,7 +8,9 @@
static unsigned int hash_obj(const struct object *obj, unsigned int n)
{
- unsigned int hash = *(unsigned int *)obj->sha1;
+ unsigned int hash;
+
+ memcpy(&hash, obj->sha1, sizeof(unsigned int));
return hash % n;
}