summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2012-01-21 04:52:27 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2012-01-21 04:52:27 +0000
commitc4120e45934e7ebafc2211c367f152fae9786dad (patch)
treeec3b5b0c819f6de1e3d508e0a8a935073f50ebcd /legacy
parenta47da47844b8490e64284eb0494825020ff5dc6b (diff)
ensure trailing \0
SVN revision: 67414
Diffstat (limited to 'legacy')
-rw-r--r--legacy/eina/src/tests/eina_test_simple_xml_parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/legacy/eina/src/tests/eina_test_simple_xml_parser.c b/legacy/eina/src/tests/eina_test_simple_xml_parser.c
index 1e0c6f8c5f..7093019e3f 100644
--- a/legacy/eina/src/tests/eina_test_simple_xml_parser.c
+++ b/legacy/eina/src/tests/eina_test_simple_xml_parser.c
@@ -44,13 +44,14 @@ START_TEST(eina_simple_xml_parser_node_dump)
44 char *buf; 44 char *buf;
45 45
46 fseek(f, 0, SEEK_SET); 46 fseek(f, 0, SEEK_SET);
47 buf = malloc(sz); 47 buf = malloc(sz + 1);
48 if (buf) 48 if (buf)
49 { 49 {
50 if (fread(buf, 1, sz, f)) 50 if (fread(buf, 1, sz, f))
51 { 51 {
52 Eina_Simple_XML_Node_Root *root = eina_simple_xml_node_load 52 Eina_Simple_XML_Node_Root *root = eina_simple_xml_node_load
53 (buf, sz, EINA_TRUE); 53 (buf, sz, EINA_TRUE);
54 buf[sz] = '\0';
54 char *out = eina_simple_xml_node_dump(&root->base, " "); 55 char *out = eina_simple_xml_node_dump(&root->base, " ");
55 //puts(out); 56 //puts(out);
56 ck_assert_str_eq(out, buf); 57 ck_assert_str_eq(out, buf);