mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-04-09 16:40:38 +00:00
Verify REL module tyoe before loading
This commit is contained in:
parent
5a0d9e5751
commit
1a8f3048b5
@ -1064,6 +1064,13 @@ def loadmod(mod)#1
|
||||
refnum = open(strcpy(@filename,strcat(strcpy(@header, @sysmods), @filename)))
|
||||
fin
|
||||
if refnum
|
||||
header.0 = $0A
|
||||
header:1 = @filename
|
||||
if not syscall($C4, @header) and header.4 <> $FE // Make sure it's a REL module
|
||||
close(refnum)
|
||||
perr = $4A // Incompatible type
|
||||
return -perr
|
||||
fin
|
||||
rdlen = read(refnum, @header, 128)
|
||||
modsize = header:0
|
||||
moddep = @header.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user