bug fix from Yannick Morin-Rivest

This commit is contained in:
hooper114 2008-09-02 19:39:07 +00:00
parent d38e41fa74
commit bc9a51372e

View File

@ -318,7 +318,7 @@ char ecc200encode(unsigned char *t, int tl, unsigned char *s, int sl,
} }
} }
} }
if (p == 2 && tp + 2 == tl && sp == sl) if (p == 2 && tp + 2 <= tl && sp == sl)
out[p++] = 0; // shift 1 pad at end out[p++] = 0; // shift 1 pad at end
while (p >= 3) { while (p >= 3) {
int v = int v =