This commit is contained in:
danielyxie 2019-02-26 00:48:27 -08:00
commit 78c631751e
2 changed files with 2 additions and 2 deletions

@ -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);

@ -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);