size of resulting string.
+2008-03-07 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * fileio.c (Fsubstitute_in_file_name): Fix up computation of maximum
+ size of resulting string.
+
2008-03-05 Jason Rumney <jasonr@gnu.org>
* dispnew.c (adjust_glyph_matrix): Initialize window_height.
/* Get variable value */
o = (unsigned char *) egetenv (target);
if (o)
- {
- total += strlen (o);
+ { /* Eight-bit chars occupy upto 2 bytes in multibyte. */
+ total += strlen (o) * (STRING_MULTIBYTE (filename) ? 2 : 1);
substituted = 1;
}
else if (*p == '}')