summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@xglobe.in>2020-04-29 18:23:58 +0200
committerOmar Polo <op@xglobe.in>2020-04-29 18:31:05 +0200
commit96fa570b4a23f28d5bf29d6a8ffe7b6ef0b9f5eb (patch)
tree996e4e373c5c8b2945473c3ac766a202565d5557
parent7d349bfd455666d60fdca101065fec62e46b4b08 (diff)
downloadasd-progettino-2020-master.tar.gz
asd-progettino-2020-master.tar.bz2
call memcpy(3) with the correct volues!HEADmaster
-rw-r--r--progetto.org2
1 files changed, 1 insertions, 1 deletions
diff --git a/progetto.org b/progetto.org
index 94bf75a..a2e1eb3 100644
--- a/progetto.org
+++ b/progetto.org
@@ -173,7 +173,7 @@ condizioni dell'if ma faccio =i-1= quando chiamo heapify.
if ((h->data = malloc(sizeof(int) * len)) == NULL)
err(1, "can't allocate");
- memcpy(h->data, a, len);
+ memcpy(h->data, a, len * sizeof(int));
h->cap = len;
h->len = len;