@@ -1117,7 +1117,7 @@ static bool MCDeployToMacOSXMain(const MCDeployParameters& p_params, bool p_big_
11171117 t_success = MCDeployThrow (kMCDeployErrorMacOSXNoLinkEditSegment );
11181118 if (t_success && t_project_segment == NULL )
11191119 t_success = MCDeployThrow (kMCDeployErrorMacOSXNoProjectSegment );
1120- if (t_success && p_params . payload != NULL && t_payload_segment == NULL )
1120+ if (t_success && !( MCStringIsEmpty ( p_params . payload)) && t_payload_segment == NULL )
11211121 t_success = MCDeployThrow (kMCDeployErrorMacOSXNoPayloadSegment );
11221122
11231123 // MW-2013-05-04: [[ iOSDeployMisc ]] If 'misc' segment is present but not between
@@ -1169,7 +1169,7 @@ static bool MCDeployToMacOSXMain(const MCDeployParameters& p_params, bool p_big_
11691169 if (t_success && t_payload_segment != NULL )
11701170 {
11711171 t_payload_offset = x_offset + t_output_offset;
1172- if (p_params . payload != nil )
1172+ if (! MCStringIsEmpty ( p_params . payload) )
11731173 t_success = MCDeployWritePayload (p_params, p_big_endian, p_output, t_payload_offset, t_payload_size);
11741174 if (t_success)
11751175 t_output_offset += (t_payload_size + 4095 ) & ~4095 ;
@@ -1673,21 +1673,21 @@ Exec_stat MCDeployToMacOSX(const MCDeployParameters& p_params)
16731673
16741674 // MW-2013-06-13: First check that we either have 'engine' or (ppc and/or x86).
16751675 if (t_success &&
1676- (p_params . engine != NULL && (p_params . engine_ppc != NULL || p_params . engine_x86 != NULL )))
1676+ (! MCStringIsEmpty ( p_params . engine) && (! MCStringIsEmpty ( p_params . engine_ppc) || ! MCStringIsEmpty ( p_params . engine_x86) )))
16771677 t_success = MCDeployThrow (kMCDeployErrorNoEngine );
16781678
16791679 // MW-2013-06-13: Next check that we have at least one engine.
16801680 if (t_success &&
1681- (p_params . engine == NULL && p_params . engine_ppc == NULL && p_params . engine_x86 == NULL ))
1681+ (MCStringIsEmpty ( p_params . engine) && MCStringIsEmpty ( p_params . engine_ppc) && MCStringIsEmpty ( p_params . engine_x86) ))
16821682 t_success = MCDeployThrow (kMCDeployErrorNoEngine );
16831683
16841684 // Now open the files.
16851685 MCDeployFileRef t_engine, t_engine_ppc, t_engine_x86, t_output;
16861686 t_engine = t_engine_ppc = t_engine_x86 = t_output = NULL ;
16871687 if (t_success &&
1688- (p_params . engine != NULL && !MCDeployFileOpen (p_params . engine, kMCSOpenFileModeRead , t_engine) ||
1689- p_params . engine_ppc != NULL && !MCDeployFileOpen (p_params . engine_ppc, kMCSOpenFileModeRead , t_engine_ppc) ||
1690- p_params . engine_x86 != NULL && !MCDeployFileOpen (p_params . engine_x86, kMCSOpenFileModeRead , t_engine_x86)))
1688+ ((! MCStringIsEmpty ( p_params . engine) && !MCDeployFileOpen (p_params . engine, kMCSOpenFileModeRead , t_engine) ) ||
1689+ (! MCStringIsEmpty ( p_params . engine_ppc) && !MCDeployFileOpen (p_params . engine_ppc, kMCSOpenFileModeRead , t_engine_ppc) ) ||
1690+ (! MCStringIsEmpty ( p_params . engine_x86) && !MCDeployFileOpen (p_params . engine_x86, kMCSOpenFileModeRead , t_engine_x86) )))
16911691 t_success = MCDeployThrow (kMCDeployErrorNoEngine );
16921692
16931693 if (t_success && !MCDeployFileOpen (p_params . output, kMCSOpenFileModeWrite , t_output))
@@ -1823,7 +1823,7 @@ Exec_stat MCDeployToIOS(const MCDeployParameters& p_params, bool p_embedded)
18231823 MCDeployFileRef t_engine, t_output;
18241824 t_engine = t_output = NULL ;
18251825 if (t_success &&
1826- (p_params . engine == NULL || !MCDeployFileOpen (p_params . engine, kMCSOpenFileModeRead , t_engine)))
1826+ (( MCStringIsEmpty ( p_params . engine)) || !MCDeployFileOpen (p_params . engine, kMCSOpenFileModeRead , t_engine)))
18271827 t_success = MCDeployThrow (kMCDeployErrorNoEngine );
18281828
18291829 // Make sure we can open the output file.
0 commit comments