Skip to content

Commit 0eaad9d

Browse files
authored
Fix APE error if unable to modify self
See PR #96 and issue #85
1 parent f4298f1 commit 0eaad9d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ape/ape.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,8 @@ apesh: .ascii "'\n#'\"\n" # sixth edition shebang
573573
.shstub ape_elf_shstrndx,2 # 3e: e_shstrndx
574574
.ascii "' >&7\n"
575575
.ascii "exec 7<&-\n"
576+
.ascii "else\n"
577+
.ascii "exit 1\n"
576578
.ascii "fi\n"
577579
.ascii "exec \"$0\" \"$@\"\n" # etxtbsy tail recursion
578580
.ascii "R=$?\n" # architecture optimistic

0 commit comments

Comments
 (0)