Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 9266147

Browse files
committed
Used !MCStringIsEmpty instead of MCStringGetLength to take care of null
1 parent 2757007 commit 9266147

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

engine/src/dskmac.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5530,7 +5530,7 @@ static void MCS_startprocess_launch(MCNameRef name, MCStringRef docname, Open_mo
55305530
FSRef launchedapp;
55315531
inLaunchSpec.numDocs = 0;
55325532
inLaunchSpec.itemRefs = NULL;
5533-
if (MCStringGetLength(docname))
5533+
if (!MCStringIsEmpty(docname))
55345534
{
55355535
if (MCS_mac_pathtoref(docname, t_doc_fsref) != noErr)
55365536
{
@@ -5549,7 +5549,7 @@ static void MCS_startprocess_launch(MCNameRef name, MCStringRef docname, Open_mo
55495549
}
55505550

55515551
errno = connectionInvalid;
5552-
if (MCStringGetLength(docname))
5552+
if (!MCStringIsEmpty(docname))
55535553
{
55545554
for (i = 0 ; i < MCnprocesses ; i++)
55555555
if (MCNameIsEqualTo(name, MCprocesses[i].name, kMCStringOptionCompareExact))

engine/src/exec-files.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ void MCFilesExecPerformOpenProcess(MCExecContext& ctxt, MCNameRef p_process, int
864864
ctxt . SetTheResultToStaticCString("process is already open");
865865
return;
866866
}
867-
MCS_startprocess(p_process, kMCEmptyString, (Open_mode)p_mode, p_elevated);
867+
MCS_startprocess(p_process, NULL, (Open_mode)p_mode, p_elevated);
868868
if (IO_findprocess(p_process, index))
869869
{
870870
// ENCODING what default encoding for the process?

0 commit comments

Comments
 (0)