Fixed XML logger. EscapeString didn't from strings properly.
authorMarkus Kauppila <markus.kauppila@gmail.com>
Sun, 03 Jul 2011 10:54:21 +0300
changeset 5737 303be71c64aa
parent 5736 1008297b86e1
child 5738 8fc92ff2054b
Fixed XML logger. EscapeString didn't from strings properly.
test/test-automation/xml.c
--- a/test/test-automation/xml.c	Fri Jul 01 22:15:23 2011 +0300
+++ b/test/test-automation/xml.c	Sun Jul 03 10:54:21 2011 +0300
@@ -159,6 +159,7 @@
 			break;
 		}
 	}
+	totalSize += 1; // for '\0'
 
 	char *retBuffer = SDL_malloc(totalSize * sizeof(char));
 	if(retBuffer == NULL) {
@@ -212,6 +213,8 @@
 
 	}
 
+	retBuffer[retBufferCounter] = '\0';
+
 	return retBuffer;
 }