Fix problems found after verification of local commits.

This commit is contained in:
Henrik Ekblad
2014-07-27 16:55:41 +02:00
parent a845691b8b
commit 7fb39d69d4
5 changed files with 10 additions and 8 deletions
+1 -2
View File
@@ -35,10 +35,9 @@ const char* MyMessage::getString() const {
char* MyMessage::getString(char *buffer) const {
uint8_t payloadType = miGetPayloadType();
if (payloadType == P_STRING) {
strncpy(buffer, data, miGetLength());
buffer[miGetLength()] = '\0';
buffer[miGetLength()] = 0;
return buffer;
} else if (buffer != NULL) {
switch(payloadType) {