diff util/datamanager.lua @ 14018:7ffb2d3ab50b 13.0

util.datamanager: Include record length in header In order to distinguish 32bit from 64bit architectures since they look the same when truncated and little-endian.
author Kim Alvefur <zash@zash.se>
date Tue, 09 Dec 2025 21:41:34 +0100
parents 515ac7e8ae6d
children 604bed81808e
line wrap: on
line diff
--- a/util/datamanager.lua	Fri Dec 19 14:49:50 2025 +0000
+++ b/util/datamanager.lua	Tue Dec 09 21:41:34 2025 +0100
@@ -274,7 +274,7 @@
 if string.packsize then
 	index_fmt = "T"; -- offset to the end of the item, length can be derived from two index items
 	index_item_size = string.packsize(index_fmt);
-	index_magic = string.pack(index_fmt, 7767639 + 1); -- Magic string: T9 for "prosody", version number
+	index_magic = string.pack(index_fmt, 7767639 + 2 + index_item_size); -- Magic string: T9 for "prosody", version number
 end
 
 local function list_append(username, host, datastore, data)