Mercurial > emacs
comparison src/fileio.c @ 80296:7a2d0126392f
(Fsubstitute_in_file_name): Fix up computation of maximum
size of resulting string.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 07 Mar 2008 15:42:30 +0000 |
parents | 1c722a2da14e |
children | 339dff977be0 d999f30304bc |
comparison
equal
deleted
inserted
replaced
80295:60443150f1b2 | 80296:7a2d0126392f |
---|---|
2224 #endif /* DOS_NT */ | 2224 #endif /* DOS_NT */ |
2225 | 2225 |
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 == '}') |
2234 goto badvar; | 2234 goto badvar; |
2235 } | 2235 } |