diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/timefns.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/timefns.c b/src/timefns.c index 3948f873354..2d545a4f905 100644 --- a/src/timefns.c +++ b/src/timefns.c | |||
| @@ -1035,12 +1035,12 @@ time_arith (Lisp_Object a, Lisp_Object b, bool subtract) | |||
| 1035 | double db = XFLOAT_DATA (Ffloat_time (b)); | 1035 | double db = XFLOAT_DATA (Ffloat_time (b)); |
| 1036 | return make_float (subtract ? da - db : da + db); | 1036 | return make_float (subtract ? da - db : da + db); |
| 1037 | } | 1037 | } |
| 1038 | if (FLOATP (b) && !isfinite (XFLOAT_DATA (b))) | ||
| 1039 | return subtract ? make_float (-XFLOAT_DATA (b)) : b; | ||
| 1040 | |||
| 1041 | enum timeform aform, bform; | 1038 | enum timeform aform, bform; |
| 1042 | struct lisp_time ta = lisp_time_struct (a, &aform); | 1039 | struct lisp_time ta = lisp_time_struct (a, &aform); |
| 1043 | 1040 | ||
| 1041 | if (FLOATP (b) && !isfinite (XFLOAT_DATA (b))) | ||
| 1042 | return subtract ? make_float (-XFLOAT_DATA (b)) : b; | ||
| 1043 | |||
| 1044 | /* Subtract nil from nil correctly, and handle other eq values | 1044 | /* Subtract nil from nil correctly, and handle other eq values |
| 1045 | quicker while we're at it. Compare here rather than earlier, to | 1045 | quicker while we're at it. Compare here rather than earlier, to |
| 1046 | handle NaNs and check formats. */ | 1046 | handle NaNs and check formats. */ |