diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2020-02-17 12:44:10 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-02-17 12:44:29 -0800 |
commit | 121f9bb14ab0abe618cabd24bd25ed328e36891c (patch) | |
tree | df2abcc3c21b0a64197ed63a7924dcfce8149547 | |
parent | 556cc727e5076d590f8286406e4f46cff3cee41e (diff) | |
download | emacs-121f9bb14ab0abe618cabd24bd25ed328e36891c.tar.gz |
Avoid unlikely load-average bug
* src/fns.c (Fload_average): Do not crash or return nonsense
if the load average exceeds most-positive-fixnum/100 (Bug#39577).
-rw-r--r-- | src/fns.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fns.c b/src/fns.c index 436ef1c7b74..80012fa9d28 100644 --- a/src/fns.c +++ b/src/fns.c @@ -2843,7 +2843,7 @@ advisable. */) while (loads-- > 0) { Lisp_Object load = (NILP (use_floats) - ? make_fixnum (100.0 * load_ave[loads]) + ? double_to_integer (100.0 * load_ave[loads]) : make_float (load_ave[loads])); ret = Fcons (load, ret); } |