diff options
author | why <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-05-25 14:57:25 +0000 |
---|---|---|
committer | why <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-05-25 14:57:25 +0000 |
commit | ca1dca02b029a7d6b8c9a3a5cc21221346f792bc (patch) | |
tree | ddaf1ae454ef0577c631ed5fe8114d8d64587d51 /ext/syck | |
parent | 82572952ecf82aad6bc47a51e3d63d7b52858b2d (diff) | |
download | ruby-ca1dca02b029a7d6b8c9a3a5cc21221346f792bc.tar.gz |
* ext/syck/syck.c (syck_new_parser): clear parser on init.
thanks, ts. [ruby-core:02931]
* ext/syck/token.c (sycklex_yaml_utf8): buffer underflow.
thanks, ts. [ruby-core:02929]
* lib/yaml/baseemitter.rb (indent_text): simpler flow block code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/syck')
-rw-r--r-- | ext/syck/syck.c | 1 | ||||
-rw-r--r-- | ext/syck/token.c | 2 |
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; } |