summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/dvsave.cpp
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2021-04-20 02:12:47 -0700
committer Aaron Giles <aaron@aarongiles.com>2021-04-20 02:12:47 -0700
commit8d047a8f0dcfb1bdaa4dcf87c001a30ebcc7cca8 (patch)
treef0ca7134fd27aa3d9967195dd8946be542c749cc /src/emu/debug/dvsave.cpp
parent7e33cb29e24b2ce9c4c3bf7b1d7b8784a93f3172 (diff)
Better handling of null/missing items. More consistent error handling. Reduced compression to default to speed up saves. Optimized simple binary saves as well. Device interfaces now have automatic containers. Fixed duplicate entry detection. Added logic to parse an item we're skipping. Added detection of missing/duplicate items from input JSON. Fixed timing for save/load.save-experiments
Diffstat (limited to 'src/emu/debug/dvsave.cpp')
-rw-r--r--src/emu/debug/dvsave.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/emu/debug/dvsave.cpp b/src/emu/debug/dvsave.cpp
index eda3fb59235..141d744f7e9 100644
--- a/src/emu/debug/dvsave.cpp
+++ b/src/emu/debug/dvsave.cpp
@@ -63,6 +63,11 @@ void debug_view_save::build_list_recursive(save_registered_item &item, uintptr_t
if (item.unwrap_and_update_base(objbase))
return build_list_recursive(item.subitems().front(), objbase, depth, count);
+ // only containers are allowed to have null bases past this point; treat
+ // everything else as non-existent
+ if (objbase == 0 && item.type() != save_registered_item::TYPE_CONTAINER)
+ return;
+
// switch off the type
switch (item.type())
{
@@ -305,6 +310,11 @@ std::string debug_view_save::save_item::value(save_registered_item &item, int co
if (item.unwrap_and_update_base(objbase))
return value(item.subitems().front(), 0, objbase, collapsed);
+ // only containers are allowed to have null bases past this point; treat
+ // everything else as non-existent
+ if (objbase == 0 && item.type() != save_registered_item::TYPE_CONTAINER)
+ return "(null)";
+
char tempbuf[256];
tempbuf[0] = 0;
int pos = 0;