[AD] usprintf behavoir changed

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


hello

somewhere between WIP 3935 and 3938, the behavoir of usprintf has changed.
It doesn't  always follow that of sprintf anymore. Here's an example
program:

------------
#include <stdio.h>
#include <allegro.h>

int main(int argc, char *argv[])
{
   char buf[256];

   set_uformat(U_ASCII);
   allegro_init();

   printf("test1: behavoir of usprintf ok\n");
   usprintf(buf, "%10s.\n", "x");
   printf(buf);
   sprintf(buf, "%10s.\n", "x");
   printf(buf);

   printf("test2: usprintf doesn't behave like sprintf\n");
   usprintf(buf, "%10s.\n", "");
   printf(buf);
   sprintf(buf, "%10s.\n", "");
   printf(buf);

   return 0;
}
END_OF_MAIN();
------------

the results of test2 are identical when compiled with 3935, but not when
compiled with 3938 and above. I don't have WIPs in between, so I can't tell.

Is it intended? Because it just broke one of my progs =) I can figure a
workaround, but I think this change was not intended... if it was, sorry for
the question

Julien Cugniere



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/