Re: [gtk-list] gtkwidget + sprintf = bug ??

ryo writes:
>I have a problem when combining sprintf and 6 declarations of widget
>pointers. Sounds strange but I can explain. Look at the function end of
>this mail: 
>[extra snipped]
>Hope someone will be abble to help. 

It looks like you declared str as a pointer:

char *str;

Then printed to it without allocating the space:


Either use:
char str[whatever_size_you_need];
or malloc the space first.

John Ellis <>

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