mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-09 13:33:26 +00:00
Free prefix buffer before execmod
This commit is contained in:
parent
af57dfdeeb
commit
4ca1ba9c04
@ -170,9 +170,11 @@ end
|
||||
//
|
||||
def shell#1
|
||||
byte textmode[3]
|
||||
byte prefix[64]
|
||||
word prefix
|
||||
byte err[]
|
||||
word cmdptr
|
||||
|
||||
prefix = heapalloc(64)
|
||||
//
|
||||
// Copy AUTORUN commmand line
|
||||
//
|
||||
@ -188,18 +190,18 @@ def shell#1
|
||||
break
|
||||
is 'P'
|
||||
if ^cmdptr and ^(cmdptr + 1) <> '/'
|
||||
strcat(@prefix, cmdptr)
|
||||
strcat(prefix, cmdptr)
|
||||
else
|
||||
strcpy(@prefix, cmdptr)
|
||||
strcpy(prefix, cmdptr)
|
||||
fin
|
||||
setpfx(@prefix)
|
||||
setpfx(prefix)
|
||||
break
|
||||
is '/'
|
||||
repeat
|
||||
prefix--
|
||||
until prefix[prefix] == '/'
|
||||
if prefix > 1
|
||||
setpfx(@prefix)
|
||||
^prefix--
|
||||
until prefix->[^prefix] == '/'
|
||||
if ^prefix > 1
|
||||
setpfx(prefix)
|
||||
fin
|
||||
break
|
||||
is 'S'
|
||||
@ -210,6 +212,7 @@ def shell#1
|
||||
volumes
|
||||
break
|
||||
is '+'
|
||||
heaprelease(prefix)
|
||||
//cmdsys:modexec(striptrail(cmdptr))
|
||||
return striptrail(cmdptr)
|
||||
//cmdsys:syswrite(cmdsys.refcons, @textmode, 3)
|
||||
@ -226,7 +229,7 @@ def shell#1
|
||||
fin
|
||||
putln
|
||||
fin
|
||||
puts(getpfx(@prefix))
|
||||
puts(getpfx(prefix))
|
||||
cmdptr = gets($BA)
|
||||
strcpy(cmdsys:cmdline, cmdptr)
|
||||
until 0
|
||||
|
@ -245,9 +245,11 @@ end
|
||||
//
|
||||
def shell#1
|
||||
byte textmode[3]
|
||||
byte prefix[64]
|
||||
word prefix
|
||||
byte err[]
|
||||
word cmdptr
|
||||
|
||||
prefix = heapalloc(64)
|
||||
//
|
||||
// Copy AUTORUN commmand line
|
||||
//
|
||||
@ -263,18 +265,18 @@ def shell#1
|
||||
break
|
||||
is 'P'
|
||||
if ^cmdptr and ^(cmdptr + 1) <> '/'
|
||||
strcat(@prefix, cmdptr)
|
||||
strcat(prefix, cmdptr)
|
||||
else
|
||||
strcpy(@prefix, cmdptr)
|
||||
strcpy(prefix, cmdptr)
|
||||
fin
|
||||
setpfx(@prefix)
|
||||
setpfx(prefix)
|
||||
break
|
||||
is '/'
|
||||
repeat
|
||||
prefix--
|
||||
until prefix[prefix] == '/'
|
||||
if prefix > 1
|
||||
setpfx(@prefix)
|
||||
^prefix--
|
||||
until prefix->[^prefix] == '/'
|
||||
if ^prefix > 1
|
||||
setpfx(prefix)
|
||||
fin
|
||||
break
|
||||
is 'S'
|
||||
@ -285,6 +287,7 @@ def shell#1
|
||||
volumes
|
||||
break
|
||||
is '+'
|
||||
heaprelease(prefix)
|
||||
*jitcodeptr = jitcbuf
|
||||
//cmdsys:modexec(striptrail(cmdptr))
|
||||
return striptrail(cmdptr)
|
||||
@ -302,7 +305,7 @@ def shell#1
|
||||
fin
|
||||
putln
|
||||
fin
|
||||
puts(getpfx(@prefix))
|
||||
puts(getpfx(prefix))
|
||||
cmdptr = gets($BA)
|
||||
strcpy(cmdsys:cmdline, cmdptr)
|
||||
until 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user