diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2011-06-08 17:40:43 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-06-08 17:40:43 -0700 |
| commit | 666398f3715a5ae76abeee1c8d760551dcf4d70e (patch) | |
| tree | 5596d2b4a0f11973a32eb515eedb4e8789668532 /src/buffer.c | |
| parent | e762cafe713e475886e7f1aed75b0aa213fe4c74 (diff) | |
* buffer.c (Fgenerate_new_buffer_name): Use EMACS_INT for count, not int.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/buffer.c b/src/buffer.c index e9ff8f492ba..453ea838902 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -841,8 +841,8 @@ it is in the sequence to be tried) even if a buffer with that name exists. */) (register Lisp_Object name, Lisp_Object ignore) { register Lisp_Object gentemp, tem; - int count; - char number[10]; + EMACS_INT count; + char number[INT_BUFSIZE_BOUND (EMACS_INT) + sizeof "<>"]; CHECK_STRING (name); @@ -856,7 +856,7 @@ it is in the sequence to be tried) even if a buffer with that name exists. */) count = 1; while (1) { - sprintf (number, "<%d>", ++count); + sprintf (number, "<%"pI"d>", ++count); gentemp = concat2 (name, build_string (number)); tem = Fstring_equal (gentemp, ignore); if (!NILP (tem)) |
