diff --git a/overlay/Scripts/Custom/Bridge/BridgeCliloc.cs b/overlay/Scripts/Custom/Bridge/BridgeCliloc.cs index 1118769..8d53b9b 100644 --- a/overlay/Scripts/Custom/Bridge/BridgeCliloc.cs +++ b/overlay/Scripts/Custom/Bridge/BridgeCliloc.cs @@ -196,9 +196,15 @@ namespace Server.Custom.Bridge .Num("total", table.Count) .Bool("compressed", table.Compressed); + // Before the page opens, not after it closes: PageBuilder reserves room for the + // envelope it still has to write, and a field appended past Close() is spent outside + // that reserve. It fits today by a wide margin, and it is the kind of thing the next + // family copies. + int start = table.IndexAfter(after); + sb.Num("from", start); + var page = new BridgeAssets.PageBuilder(sb, "rows", BridgeConfig.AssetBatchBytes); - int start = table.IndexAfter(after); int i = start; for (; i < table.Count; i++) @@ -219,7 +225,6 @@ namespace Server.Custom.Bridge bool finished = i >= table.Count; - sb.Num("from", start); BridgeLink.Emit(sb.End()); // The last page is also the end of the import, so let the strings go. A retry of that