]> git.eshelyaron.com Git - emacs.git/commitdiff
Don’t mishandle (format "%i" -1.0)
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 28 Mar 2017 19:44:09 +0000 (12:44 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 28 Mar 2017 19:44:33 +0000 (12:44 -0700)
* src/editfns.c (styled_format): Treat %i like %d when converting arg.

src/editfns.c

index 65c0c721d11cc69d0ecf9c81aa1c4c7567b3e742..2dafd8e7b1bbbb8002d05f1cba391d7f0375c724 100644 (file)
@@ -4356,7 +4356,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
                  sprintf_buf[0] = XINT (args[n]);
                  sprintf_bytes = prec != 0;
                }
-             else if (conversion == 'd')
+             else if (conversion == 'd' || conversion == 'i')
                {
                  /* For float, maybe we should use "%1.0f"
                     instead so it also works for values outside