mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-21 00:59:29 +00:00
First check object type for subclass (#870)
This commit is contained in:
parent
0297eb726a
commit
19b3132ade
1 changed files with 9 additions and 9 deletions
|
|
@ -155,15 +155,7 @@ function readVariables({ makiFile, classes }) {
|
|||
const global = makiFile.readUInt8();
|
||||
makiFile.readUInt8(); // system
|
||||
|
||||
if (object) {
|
||||
const klass = classes[typeOffset];
|
||||
if (klass == null) {
|
||||
throw new Error("Invalid type");
|
||||
}
|
||||
variables.push(
|
||||
new Variable({ type: klass, typeName: "OBJECT", global: !!global })
|
||||
);
|
||||
} else if (subClass) {
|
||||
if (subClass) {
|
||||
const variable = variables[typeOffset];
|
||||
if (variable == null) {
|
||||
throw new Error("Invalid type");
|
||||
|
|
@ -171,6 +163,14 @@ function readVariables({ makiFile, classes }) {
|
|||
variables.push(
|
||||
new Variable({ type: variable, typeName: "SUBCLASS", global: !!global })
|
||||
);
|
||||
} else if (object) {
|
||||
const klass = classes[typeOffset];
|
||||
if (klass == null) {
|
||||
throw new Error("Invalid type");
|
||||
}
|
||||
variables.push(
|
||||
new Variable({ type: klass, typeName: "OBJECT", global: !!global })
|
||||
);
|
||||
} else {
|
||||
const typeName = PRIMITIVE_TYPES[typeOffset];
|
||||
if (typeName == null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue