Gee, transaction_info->action_text has fixed length char[10]
Christian Stimming
stimming@tuhh.de
Thu, 14 Nov 2002 01:11:16 +0100
-----BEGIN PGP SIGNED MESSAGE-----
... and this is a BAAAAD IDEA! I was a bit puzzled that the German translated
version showed a few weird strings -- until I discovered that you allocated a
buffer of FIXED LENGTH for this string! You might have thougth that only your
fixed strings are written into there -- but you get those strings translated,
and guess how long the translated strings are? Correct, they are longer.
Please replace all places of char[xx] allocations of fixed length with
g_strdup dynamic allocations (strings that are dynamically allocated and
free'd with g_free). The necessary functions are found in
http://developer.gnome.org/doc/API/glib/glib-string-utility-functions.html
But for those messages you don't even have to copy strings around --
transaction_info just needs to keep one "const char" pointer and you only
change that pointer. Shouldn't be too difficult, either.
Anyway, please implement that, if you're working on it anyway. On the other
hand, it's not breaking things at the moment, so you can just do it whenever
there's time, but no extra hurry here.
Christian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iQCVAwUBPdLqJGXAi+BfhivFAQHs5wP/dUsDEtrJo2SA44UVgeN4LEzPHZ3B8Vv4
84MoRl1QkxfKc8TeKYKLKH9gWKbTpSGBpuuwQNC16xxEWfqyESbBFnNEAlrS4ESe
1UzWbXO9jbJ9aHGdYvijPumVOlP975R2uQkDb3W5oU64AgVRICpfyDInljpDzbo0
fti4kMhVH+o=
=qjZ8
-----END PGP SIGNATURE-----