Skip to content

Commit 400d143

Browse files
committed
Fix emscripten build.
1 parent 9c80091 commit 400d143

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/tools/ecode/ecode.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5021,8 +5021,9 @@ void App::init( InitParameters& params ) {
50215021
Log::info( "Complete UI took: %.2f ms", globalClock.getElapsedTime().asMilliseconds() );
50225022

50235023
#if EE_PLATFORM == EE_PLATFORM_EMSCRIPTEN
5024-
if ( params.file == "./this.program" )
5025-
params.file = "";
5024+
if ( !params.files.empty() && params.files[0] == "./this.program" ) {
5025+
params.files.erase( params.files.begin() );
5026+
}
50265027
#endif
50275028

50285029
if ( params.terminal && params.files.empty() && params.fileToOpen.empty() ) {
@@ -5048,7 +5049,7 @@ void App::init( InitParameters& params ) {
50485049
globalClock.getElapsedTime().asMilliseconds() );
50495050

50505051
#if EE_PLATFORM == EE_PLATFORM_EMSCRIPTEN
5051-
if ( params.file.empty() || !mFileToOpen.empty() )
5052+
if ( params.files.empty() || !mFileToOpen.empty() )
50525053
downloadFileWeb(
50535054
mFileToOpen.empty()
50545055
? "https://raw.githubusercontent.com/SpartanJ/eepp/develop/README.md"

0 commit comments

Comments
 (0)