Use "-=" instead of "+=" to ensure a value <= 127.

committer: mfx <mfx> 974915086 +0000
This commit is contained in:
Markus F.X.J. Oberhumer 2000-11-22 17:44:46 +00:00
parent 3be1f60c59
commit e14017fc8b

View File

@ -100,7 +100,7 @@ static uint32_t ascii5(char *p, uint32_t v, unsigned n)
{
do {
unsigned char d = v % 32;
if (d >= 26) d += '0' - 'Z' - 1;
if (d >= 26) d -= 43; // 43 == 'Z' - '0' + 1
*--p += d;
v /= 32;
} while (--n > 0);