mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-05 07:48:45 +00:00
read_expert_profile read the header's version field and then ignored it ((void) version), so a profile of a later format would have been read as a version 1 layout: the fields after the version are only known to be n_layers, n_expert, slots, n_ranked in a version 1 file. Refuse any other version right after the magic, before the geometry check, with the version found, the version this engine reads, and the file path in the message. tests/core/expert_profile_version_test.cpp (registered like expert_profile_save_test, CPU only): a version 1 file loads; the same bytes with the version field at 2 or 0 are refused naming the version and the file; a version 2 file of another geometry is refused by its version, not its geometry; back at 1 it loads again. (PR #632)