summaryrefslogtreecommitdiff
path: root/user/xapian-core/sortable-serialise.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/xapian-core/sortable-serialise.patch')
-rw-r--r--user/xapian-core/sortable-serialise.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/user/xapian-core/sortable-serialise.patch b/user/xapian-core/sortable-serialise.patch
new file mode 100644
index 000000000..d7cb9209a
--- /dev/null
+++ b/user/xapian-core/sortable-serialise.patch
@@ -0,0 +1,15 @@
+Discussing with upstream, but for now, this does fix both the test suite
+and operationally the ability to serialise +Inf values.
+--- xapian-core-1.4.25/api/sortable-serialise.cc.old 2024-03-07 16:57:54.000000000 -0600
++++ xapian-core-1.4.25/api/sortable-serialise.cc 2024-05-30 00:49:54.835053392 -0500
+@@ -55,6 +55,10 @@
+
+ // Negative infinity.
+ if (value < -DBL_MAX) return 0;
++ if (value == HUGE_VAL) {
++ memset(buf, '\xff', 9);
++ return 9;
++ }
+
+ mantissa = frexp(value, &exponent);
+