diff options
| author | Richard M. Stallman <rms@gnu.org> | 2006-08-31 23:07:39 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 2006-08-31 23:07:39 +0000 |
| commit | de92d4d43e1b6d96a895ccee0389cd240fbf0dbe (patch) | |
| tree | 985e85f30f73c8968cda39e3299d82efb8f4ea6b /src | |
| parent | fd2adae323edb7a6aaa0b890154cc5d5dda0b2f4 (diff) | |
| download | emacs-de92d4d43e1b6d96a895ccee0389cd240fbf0dbe.tar.gz | |
(Fformat): Don't sign-extend for %o or %x.
Diffstat (limited to 'src')
| -rw-r--r-- | src/editfns.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/editfns.c b/src/editfns.c index c43528c4863..e916b505fe8 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3758,7 +3758,13 @@ usage: (format STRING &rest OBJECTS) */) this_format[format - this_format_start] = 0; if (INTEGERP (args[n])) - sprintf (p, this_format, XINT (args[n])); + { + if (format[-1] == 'd') + sprintf (p, this_format, XINT (args[n])); + /* Don't sign-extend for octal or hex printing. */ + else + sprintf (p, this_format, XUINT (args[n])); + } else sprintf (p, this_format, XFLOAT_DATA (args[n])); |
