# HG changeset patch # User reimar # Date 1280050890 0 # Node ID 7bbcba59cea66af889e99bf4c6b3c59868271ceb # Parent 0cf0df0ed1364cab6e5a9385477a638e873d1097 Slightly simplify rle decoding. diff -r 0cf0df0ed136 -r 7bbcba59cea6 spudec.c --- a/spudec.c Sun Jul 25 09:33:49 2010 +0000 +++ b/spudec.c Sun Jul 25 09:41:30 2010 +0000 @@ -300,13 +300,12 @@ unsigned int rle = 0; rle = get_nibble(packet); if (rle < 0x04) { - rle = (rle << 4) | get_nibble(packet); - if (rle < 0x10) { + if (rle == 0) { rle = (rle << 4) | get_nibble(packet); - if (rle < 0x040) { + if (rle < 0x04) rle = (rle << 4) | get_nibble(packet); - } } + rle = (rle << 4) | get_nibble(packet); } color = 3 - (rle & 0x3); len = rle >> 2;