diff options
| author | Stefan Monnier | 2008-03-07 15:42:30 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-03-07 15:42:30 +0000 |
| commit | 3efaadb7b2c3e5c4e7e48622b1def6e2872cf866 (patch) | |
| tree | 0c6739cb0771dd0329b8d79848457619732b3bc1 /src/fileio.c | |
| parent | c80b160d0722ae1ee0fc5e09e829c16fc2f4aaa3 (diff) | |
| download | emacs-3efaadb7b2c3e5c4e7e48622b1def6e2872cf866.tar.gz emacs-3efaadb7b2c3e5c4e7e48622b1def6e2872cf866.zip | |
(Fsubstitute_in_file_name): Fix up computation of maximum
size of resulting string.
Diffstat (limited to 'src/fileio.c')
| -rw-r--r-- | src/fileio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c index c5bff5b8153..769a719191e 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -2226,8 +2226,8 @@ duplicates what `expand-file-name' does. */) | |||
| 2226 | /* Get variable value */ | 2226 | /* Get variable value */ |
| 2227 | o = (unsigned char *) egetenv (target); | 2227 | o = (unsigned char *) egetenv (target); |
| 2228 | if (o) | 2228 | if (o) |
| 2229 | { | 2229 | { /* Eight-bit chars occupy upto 2 bytes in multibyte. */ |
| 2230 | total += strlen (o); | 2230 | total += strlen (o) * (STRING_MULTIBYTE (filename) ? 2 : 1); |
| 2231 | substituted = 1; | 2231 | substituted = 1; |
| 2232 | } | 2232 | } |
| 2233 | else if (*p == '}') | 2233 | else if (*p == '}') |