Skip to content

Commit

Permalink
fix: try fixing game base checker
Browse files Browse the repository at this point in the history
  • Loading branch information
xxCherry committed Nov 16, 2024
1 parent c57e953 commit eb2d3c3
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions packages/tosu/src/memory/lazer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,18 @@ export class LazerMemory extends AbstractMemory<LazerPatternData> {
}

private checkIfGameBase(address: number): boolean {
const vtable = this.process.readIntPtr(address);
try {
const vtable = this.process.readIntPtr(address);

if (!vtable) {
if (!vtable) {
return false;
}

// might potentially change
return this.process.readLong(vtable) === 7559159218176;
} catch {
return false;
}

// might potentially change
return this.process.readLong(vtable) === 7559159218176;
}

private gameBase() {
Expand Down

0 comments on commit eb2d3c3

Please sign in to comment.