diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2012-09-22 13:47:55 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2012-09-22 13:47:55 +0100 |
commit | 9c77fbf0850c364c31f80e30c54137252291ec91 (patch) | |
tree | dad13ba8f43346dfbb5785580e730d92ca16c367 /lib/xmltree.c | |
parent | c6fc24a81fa14cea4b3f497bbbb0e6e65a3cc6d4 (diff) | |
parent | 11ec07811cc41e1b244467d25772ef021be9db1b (diff) |
Merge mainline.
Diffstat (limited to 'lib/xmltree.c')
-rw-r--r-- | lib/xmltree.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/xmltree.c b/lib/xmltree.c index 74292be9..91d256d2 100644 --- a/lib/xmltree.c +++ b/lib/xmltree.c @@ -262,13 +262,16 @@ void xt_cleanup( struct xt_parser *xt, struct xt_node *node, int depth ) } } -struct xt_node *xt_from_string( const char *in ) +struct xt_node *xt_from_string( const char *in, int len ) { struct xt_parser *parser; struct xt_node *ret; + if( len == 0 ) + len = strlen( in ); + parser = xt_new( NULL, NULL ); - xt_feed( parser, in, strlen( in ) ); + xt_feed( parser, in, len ); ret = parser->root; parser->root = NULL; xt_free( parser ); |