diff options
| author | Richard M. Stallman | 2005-09-23 18:22:46 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-09-23 18:22:46 +0000 |
| commit | 913f73d4ee958218c5ce3b5a3957bee4f844f124 (patch) | |
| tree | 21e94238af5b0a19730bab0fa8ef145f0defd10a /src | |
| parent | 91773964a584a74b2879cd344f6094aad4afd6e8 (diff) | |
| download | emacs-913f73d4ee958218c5ce3b5a3957bee4f844f124.tar.gz emacs-913f73d4ee958218c5ce3b5a3957bee4f844f124.zip | |
(Fformat): Explicitly test for end of format string and don't use `index'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/editfns.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/editfns.c b/src/editfns.c index c8b02570c12..ee1249acc11 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -3424,7 +3424,9 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3424 | digits to print after the '.' for floats, or the max. | 3424 | digits to print after the '.' for floats, or the max. |
| 3425 | number of chars to print from a string. */ | 3425 | number of chars to print from a string. */ |
| 3426 | 3426 | ||
| 3427 | while (*format && index ("-0# ", *format)) | 3427 | while (format != end |
| 3428 | && (*format == '-' || *format == '0' || *format == '#' | ||
| 3429 | || * format == ' ')) | ||
| 3428 | ++format; | 3430 | ++format; |
| 3429 | 3431 | ||
| 3430 | if (*format >= '0' && *format <= '9') | 3432 | if (*format >= '0' && *format <= '9') |