Re: formating gchar *temp
- From: Rafael Peregrino <rafael peregrino innominate com>
- To: Oliver Kroll <okroll alteuropa com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: formating gchar *temp
- Date: Tue, 14 Aug 2001 10:13:47 +0200
Hi ALL,
Oliver Kroll wrote:
so, here im trying the same question, but in a other form...
i got an gchar *temp as an parameter for a function. this function is
called with gnode->data as parameter.
but when i do so, the value of gchar *temp got the right value plus
crap char´s, too.
sample: "´ö x RIGHTVALUE"
can i formate the gchar *temp, to filter the crap char´s?
It seems to me a memory allocation/corruption problem. Probably you are
changing this variable somewhere else or are using accidentally the same
memory region for something else - who knows... I'd anyway suggest as a
possible workaround to use g_strdup() for the value assignment of *temp.
g_strdup() allocates a new pointer for the gchar. Don't forget to
g_free() it once you don't need it anymore (otherwise you'll have a
memory leak).
Kind regards,
Rafael (8-)
--
rafael peregrino innominate com
software engineer innominate AG
server appliances the linux architects
tel: +49.30.308806-81 fax: -77 http://www.innominate.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]