fix copying multiple glow point banks into a virtual POF

Every copied bank was written to the same array slot, so all but the last
were lost, and the slots left behind kept their zero-initialized contents.
A zeroed bitmap handle is slot 0 rather than -1, so the paging code would
then page out an unrelated bitmap.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
Goober5000andClaude Opus 5 committed 2026-09-06 00:49:33 -04:00
1 parent 1a48c2d2a6
commit 086c553339
1 file changed
+1
+1
View File
@@ -482,6 +482,7 @@ void VirtualPOFOperationAddSubmodel::process(polymodel* pm, model_read_deferred_
for (const glow_point_bank* gpb : glowpointbanks) {
pm->glow_point_banks[insertFrom] = object_copy_including_array_member(*gpb, &glow_point_bank::num_points, &glow_point_bank::points);
change_submodel_numbers(pm->glow_point_banks[insertFrom], replaceSubobjNo);
insertFrom++;
}
}
}