The run length encoding hung if it found >100 equal chars

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3684 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2003-05-18 00:41:18 +00:00
parent fe6cf2d0e4
commit 644c669519

View file

@ -656,7 +656,7 @@ static void putpacket (register char *buffer)
/* Do run length encoding */ /* Do run length encoding */
for (runlen = 0; runlen < 100; runlen ++) for (runlen = 0; runlen < 100; runlen ++)
{ {
if (src[0] != src[runlen]) if (src[0] != src[runlen] || runlen == 99)
{ {
if (runlen > 3) if (runlen > 3)
{ {