[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MiNTlib (I think I'm on pl43): Bug in sprintf().



>MiNTlib pl 43 (or is it 44.. I'm losing track of patchlevels these days) and
>GCC 2.3.3, no optimisation.
>
>When a statement such as the following is run sprintf terminates after the
>first argument:-
>
>	sprintf((char *)temp, "%c%c%c%c%s%c%c", IAC, SB, TELOPT_TERMTYPE,
>		TELOPT_QUAL, term, IAC, SB);
>
>	where IAC, SB, TELOPT* are all non-ACSII characters with the top bit
>	set, ie. 127 < x < 256. The first two are actually (from memory)
>	0xff and 0xfa.
>
>All you get in temp is the first byte, ie. 0xff. printf() works correctly.

This bug has been fixed and the fix is in (what will be) PL 45.  PL 45
should be released tomorrow or the next day in an extremely untested
state; I cut the patches this weekend so now I've just got to wrap it
up and ship it soon as I get a free minute.

Cheers,
entropy

--
entropy -- it's not just a good idea, it's the second law.
Personal mail:      entropy@gnu.ai.mit.edu
MiNT library mail:  entropy@terminator.rs.itd.umich.edu
"what do you have against octal?" -jrb