diff --git a/docs/notes/bugfix-14052.md b/docs/notes/bugfix-14052.md new file mode 100644 index 00000000000..834ae3ffee2 --- /dev/null +++ b/docs/notes/bugfix-14052.md @@ -0,0 +1 @@ +# LiveCode 7 crashes without error in many commands diff --git a/engine/src/dskw32.cpp b/engine/src/dskw32.cpp index de7f055d786..d44ef088652 100644 --- a/engine/src/dskw32.cpp +++ b/engine/src/dskw32.cpp @@ -382,6 +382,8 @@ bool MCS_registry_type_to_string(uint32_t p_type, MCStringRef& r_string) } } + // SN-2014-11-18: [[ Bug 14052 ]] Avoid to return a nil string (the result is not checked anyway). + r_string = MCValueRetain(kMCEmptyString); return false; } diff --git a/engine/src/exec-files.cpp b/engine/src/exec-files.cpp index 48a8677f269..04b2755636b 100644 --- a/engine/src/exec-files.cpp +++ b/engine/src/exec-files.cpp @@ -455,6 +455,8 @@ void MCFilesEvalQueryRegistryWithType(MCExecContext& ctxt, MCStringRef p_key, MC { ctxt.SetTheResultToValue(*t_error); r_string = MCValueRetain(kMCEmptyString); + // SN-2014-11-18: [[ Bug 14052 ]] Assign the empty string to the type as well. + r_type = MCValueRetain(kMCEmptyString); } else ctxt.SetTheResultToEmpty();