Skip to content

Commit

Permalink
add warning about union data structures
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Oct 4, 2024
1 parent 88493bf commit 54267e7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/gui/gm-editor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ realtime, hit :kbd:`Alt`:kbd:`A` to switch to auto update mode.
your game before poking around in `gui/gm-editor`, especially if you are
examining data while the game is unpaused.

.. warning::

Union data structures contain fields that occupy the same memory space.
When you see the ``[union structure]`` badge at the top of the screen, be
aware that only one of the fields in the structure is likely to make sense.
The "correct" field is usually indicated by some context in the parent
structure. If there are any pointers to substructures in the union,
inspecting the pointer when it is not the "correct" field may crash the
game.

Usage
-----

Expand Down

0 comments on commit 54267e7

Please sign in to comment.