OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-atomspace commits / f2b9f61

Bug-fix depth calculation
f2b9f6111da192abf5bf663db1e015ed8a78f245
by Linas Vepštas <linasvepstas@gmail.com> · 2026-01-22T02:54:46.000Z

Changed files (1) +2 -2

opencog/atomspace/AtomSpace.cc +2 -2
……@@ -434,7 +434,7 @@ int AtomSpace::depth(const AtomSpace* as) const
434434 for (const AtomSpacePtr& base : _environ)
435435 {
436436 int d = base->depth(as);
437 if (0 < d) return d+1;
437 if (0 <= d) return d+1;
438438 }
439439 return -1;
440440}
……@@ -448,7 +448,7 @@ int AtomSpace::depth(const Handle& atom) const
448448 for (const AtomSpacePtr& base : _environ)
449449 {
450450 int d = base->depth(as);
451 if (0 < d) return d+1;
451 if (0 <= d) return d+1;
452452 }
453453 return -1;
454454}