Skip to content
Snippets Groups Projects

Fix segfaults created by recently lowered value of MAX_SONS

Merged Oliver Sander requested to merge fix-62 into master
  1. Sep 27, 2024
    • Timo Koch's avatar
      Fixup · d0e04f44
      Timo Koch authored
      d0e04f44
    • Oliver Sander's avatar
      Fix segfaults created by recently lowered value of MAX_SONS · 4e150d6b
      Oliver Sander authored
      Previously, the value of MAX_SONS for 2d grids was larger than
      necessary. Some parts of the code relied on this: They assumed
      that there would always be a nullptr entry that would mark
      the end of the array.
      
      Commit 71300a76 changed this:
      The number MAX_SONS was reduced for 2d grids to 4, which is the
      actual maximum number of sons a 2d element may have.  As a
      consequence, some loops now have to be told explicitly to not
      loop farther than MAX_SONS entries.
      
      This fixes #62
      4e150d6b
Loading