summaryrefslogtreecommitdiff
path: root/ext/syck
diff options
context:
space:
mode:
Diffstat (limited to 'ext/syck')
-rw-r--r--ext/syck/syck.c1
-rw-r--r--ext/syck/token.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/ext/syck/syck.c b/ext/syck/syck.c
index a4a3bd0c01..5a15ab4947 100644
--- a/ext/syck/syck.c
+++ b/ext/syck/syck.c
@@ -159,6 +159,7 @@ syck_new_parser()
{
SyckParser *p;
p = S_ALLOC( SyckParser );
+ S_MEMZERO( p, SyckParser, 1 );
p->lvl_capa = ALLOC_CT;
p->levels = S_ALLOC_N( SyckLevel, p->lvl_capa );
p->input_type = syck_yaml_utf8;
diff --git a/ext/syck/token.c b/ext/syck/token.c
index ac9986f564..ff192f24e1 100644
--- a/ext/syck/token.c
+++ b/ext/syck/token.c
@@ -2297,7 +2297,7 @@ yy215:
#line 938
{ if ( YYTOKEN == YYLINEPTR )
{
- if ( blockType == BLOCK_FOLD )
+ if ( blockType == BLOCK_FOLD && qidx > 0 )
{
qidx -= 1;
}