Re: glib bug



The problem is that %G is not a valid format sequence.  If you
change it to %g then the program works as expected.

Darin


Gustavo João Alves Marques Carneiro wrote:

  This program, however strange it may be, crashes due to some bug in
GLib. I'm using GLib 1.2.8.


#include <glib.h>

int main(void)
{
    char *str;
    str = g_strdup_printf(" dasd asd asas d %G sd asdas asdas",
                          3.141592654e-233);
    printf("%s\n", str);
    g_free(str);
    return 0;
}





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