1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-13 09:32:47 +00:00

(Fsubstitute_in_file_name): Fix up computation of maximum

size of resulting string.
This commit is contained in:
Stefan Monnier 2008-03-07 15:42:30 +00:00
parent c80b160d07
commit 3efaadb7b2
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
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.

View File

@ -2226,8 +2226,8 @@ duplicates what `expand-file-name' does. */)
/* 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 == '}')