summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorGDR! <gdr@go2.pl>2014-12-11 22:30:51 +0100
committerGDR! <gdr@go2.pl>2014-12-11 22:30:51 +0100
commitf7f5170d00ee10affcacf569842207120a7ab16d (patch)
tree92434590f3cc890184e21ec77c1b07c6129c6d2e /util.c
parent946e3fa1907217a0717978ac98b32ce1ee7c23ac (diff)
Fixed a warning and printing garbage
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/util.c b/util.c
index 653a009..8391279 100644
--- a/util.c
+++ b/util.c
@@ -2,6 +2,7 @@
2#include <string.h> 2#include <string.h>
3#include <tox/tox.h> 3#include <tox/tox.h>
4#include <stdio.h> 4#include <stdio.h>
5#include <stdlib.h>
5 6
6void writechecksum(uint8_t *address) 7void writechecksum(uint8_t *address)
7{ 8{
@@ -36,12 +37,13 @@ void to_hex(char_t *a, const char_t *p, int size)
36 *a++ = c - 10 + 'A'; 37 *a++ = c - 10 + 'A';
37 } 38 }
38 } 39 }
40 a = '\0';
39} 41}
40 42
41/* From utox/util.c */ 43/* From utox/util.c */
42void id_to_string(char_t *dest, const char_t *src) 44void id_to_string(char_t *dest, const char_t *src)
43{ 45{
44 to_hex(dest, src, TOX_FRIEND_ADDRESS_SIZE); 46 to_hex(dest, src, TOX_FRIEND_ADDRESS_SIZE - 1);
45} 47}
46 48
47/* From utox/util.c */ 49/* From utox/util.c */