bugfix: set .s to beginning of string

This commit is contained in:
Olaf Bergmann committed 2010-10-23 23:18:10 +02:00
1 parent 5d46b03f09
commit ea052d4a1a
1 file changed
+2 -1
+2 -1
View File
@@ -29,7 +29,8 @@ str *coap_new_string(size_t size) {
return NULL;
}
memset(s, 0, sizeof(str) + size + 1);
memset(s, 0, sizeof(str));
s->s = ((unsigned char *)s) + sizeof(str);
return s;
}