diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 02512d6c75..b48ec55200 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -8,7 +8,7 @@ concurrency: env: # Don't build python 2.7, pypy, or 32-bit wheels or Mac arm64 on Py3.8 - CIBW_SKIP: "cp36-* cp37-* cp311-* cp38-macosx_arm64 pp* *-musllinux_* *-manylinux_i686 *-win32" + CIBW_SKIP: "cp36-* cp37-* cp311-manylinux* cp312-manylinux* cp38-macosx_arm64 pp* *-musllinux_* *-manylinux_i686 *-win32" # Need to do some setup before repairing the wheel on linux... CIBW_REPAIR_WHEEL_COMMAND_LINUX: bash scripts/github-actions/repair_command_linux.sh diff --git a/avogadro/io/cjsonformat.cpp b/avogadro/io/cjsonformat.cpp index da08632650..0056ad8f1d 100644 --- a/avogadro/io/cjsonformat.cpp +++ b/avogadro/io/cjsonformat.cpp @@ -215,7 +215,7 @@ bool CjsonFormat::deserialize(std::istream& file, Molecule& molecule, json layerJson = atoms["layer"]; if (isNumericArray(layerJson)) { auto& layer = LayerManager::getMoleculeInfo(&molecule)->layer; - for (Index i = 0; i < atomCount; ++i) { + for (Index i = 0; i < atomCount && i < layerJson.size(); ++i) { while (layerJson[i] > layer.maxLayer()) { layer.addLayer(); } @@ -242,8 +242,9 @@ bool CjsonFormat::deserialize(std::istream& file, Molecule& molecule, // are there bond labels? json bondLabels = bonds["labels"]; - if (bondLabels.is_array() && bondLabels.size() == molecule.bondCount()) { - for (unsigned int i = 0; i < molecule.bondCount(); ++i) { + if (bondLabels.is_array()) { + for (unsigned int i = 0; + i < molecule.bondCount() && i < bondLabels.size(); ++i) { molecule.setBondLabel(i, bondLabels[i]); } }