diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/editfns.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/editfns.c b/src/editfns.c index c1414071c79..3f9618edb08 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -3551,10 +3551,15 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) | |||
| 3551 | || float_conversion || conversion == 'i' | 3551 | || float_conversion || conversion == 'i' |
| 3552 | || conversion == 'o' || conversion == 'x' | 3552 | || conversion == 'o' || conversion == 'x' |
| 3553 | || conversion == 'X')) | 3553 | || conversion == 'X')) |
| 3554 | error ("Invalid format operation %%%c", | 3554 | { |
| 3555 | multibyte_format | 3555 | unsigned char *p = (unsigned char *) format - 1; |
| 3556 | ? STRING_CHAR ((unsigned char *) format - 1) | 3556 | if (multibyte_format) |
| 3557 | : *((unsigned char *) format - 1)); | 3557 | error ("Invalid format operation %%%c", STRING_CHAR (p)); |
| 3558 | else | ||
| 3559 | error (*p <= 127 ? "Invalid format operation %%%c" | ||
| 3560 | : "Invalid format operation char #o%03o", | ||
| 3561 | *p); | ||
| 3562 | } | ||
| 3558 | else if (! (FIXNUMP (arg) || ((BIGNUMP (arg) || FLOATP (arg)) | 3563 | else if (! (FIXNUMP (arg) || ((BIGNUMP (arg) || FLOATP (arg)) |
| 3559 | && conversion != 'c'))) | 3564 | && conversion != 'c'))) |
| 3560 | error ("Format specifier doesn't match argument type"); | 3565 | error ("Format specifier doesn't match argument type"); |