test/test-automation/xml.c
changeset 5737 303be71c64aa
parent 5732 1da5af48b964
child 5771 3f908b34b645
--- 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;
 }