summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-08-07 08:10:12 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-08-07 08:10:12 +0000
commit88d1f04e9b40108c3662007882ebb58534cfd374 (patch)
tree743af3d87fbe7b3adbc9d6438cb13cd3f084ed1c /ext
parent99bb7615ca36c79140c9bb7c902ca7f21a2897e1 (diff)
* ext/syck/syck.c (syck_move_tokens): should avoid negative
memmove. [ruby-list:42625] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/syck/syck.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/syck/syck.c b/ext/syck/syck.c
index 24a56a5..a83c881 100644
--- a/ext/syck/syck.c
+++ b/ext/syck/syck.c
@@ -412,7 +412,8 @@ syck_move_tokens( SyckParser *p )
skip = p->limit - p->token;
if ( ( count = p->token - p->buffer ) )
{
- S_MEMMOVE( p->buffer, p->token, char, skip );
+ if (skip > 0)
+ S_MEMMOVE( p->buffer, p->token, char, skip );
p->token = p->buffer;
p->marker -= count;
p->cursor -= count;