* Get the length of this list; if it exceeds the limit, error out. * @param limit The maximum size the list can be. * @return The length of the list. */
| 1831 | * @return The length of the list. |
| 1832 | */ |
| 1833 | size_t SlGetStructListLength(size_t limit) |
| 1834 | { |
| 1835 | size_t length = SlReadArrayLength(); |
| 1836 | if (length > limit) SlErrorCorrupt("List exceeds storage size"); |
| 1837 | |
| 1838 | return length; |
| 1839 | } |
| 1840 | |
| 1841 | /** |
| 1842 | * Main SaveLoad function. |