diff --git a/src/NetscriptFunctions.js b/src/NetscriptFunctions.js index 439eebfa5..9b7e6a56a 100644 --- a/src/NetscriptFunctions.js +++ b/src/NetscriptFunctions.js @@ -2261,7 +2261,7 @@ function NetscriptFunctions(workerScript) { throw makeRuntimeRejectMsg(workerScript, `Invalid server specified for rm(): ${ip}`); } - if (fn.includes(".exe")) { + if (fn.endsWith(".exe")) { for (var i = 0; i < s.programs.length; ++i) { if (s.programs[i] === fn) { s.programs.splice(i, 1); diff --git a/src/Terminal.js b/src/Terminal.js index 926318047..bb06b6c25 100644 --- a/src/Terminal.js +++ b/src/Terminal.js @@ -1342,7 +1342,7 @@ let Terminal = { //Check programs let delTarget = commandArray[1]; - if (delTarget.includes(".exe")) { + if (delTarget.endsWith(".exe")) { for (let i = 0; i < s.programs.length; ++i) { if (s.programs[i] === delTarget) { s.programs.splice(i, 1);