Fix fuzz bug - check for 0 or negative bond (tb)

Signed-off-by: Geoff Hutchison <geoff.hutchison@gmail.com>
This commit is contained in:
Geoff Hutchison
2026-05-19 11:28:56 -04:00
parent b14e91faa5
commit 11d11524f6
+1 -1
View File
@@ -628,7 +628,7 @@ namespace OpenBabel {
int TSingleBond::getValence() {
int result=0;
if (this->tb <=NBONDTYPES) result=bondValence[this->tb-1];
if (this->tb >= 1 && this->tb <= NBONDTYPES) result=bondValence[this->tb-1];
return result;
};