projects
/
ecparse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
670b524
)
make length calculation more obvious
author
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Sat, 5 Jul 2008 20:54:11 +0000
(22:54 +0200)
committer
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Sat, 5 Jul 2008 20:54:11 +0000
(22:54 +0200)
ED2KLink.cpp
patch
|
blob
|
history
diff --git
a/ED2KLink.cpp
b/ED2KLink.cpp
index
74a38c9
..
f8e7373
100644
(file)
--- a/
ED2KLink.cpp
+++ b/
ED2KLink.cpp
@@
-25,7
+25,7
@@
ED2KLink::ED2KLink(const char* filename, const size_t size, const void* hash) {
memcpy(this->hash, hash, 16);
this->size = size;
- link = (char*) calloc(13 +
(strlen(filename) + 1) + 1 + getDigits(size) + 1 + 32 + 2
, 1);
+ link = (char*) calloc(13 +
strlen(filename) + 1 + getDigits(size) + 1 + 32 + 2 + 1
, 1);
sprintf(link, "ed2k://|file|%s|%u|", filename, size);
for (int i = 0; i < 16; i++) {
sprintf(link + strlen(link), "%02X", ((unsigned char*) hash)[i] & 0xff);