bun-memory 1.1.43 → 1.1.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bun-memory",
3
- "version": "1.1.43",
3
+ "version": "1.1.44",
4
4
  "author": "Stev Peifer <stev@bell.net>",
5
5
  "repository": {
6
6
  "type": "git",
@@ -52,6 +52,6 @@
52
52
  },
53
53
  "type": "module",
54
54
  "dependencies": {
55
- "bun-kernel32": "^1.0.5"
55
+ "bun-kernel32": "^1.0.9"
56
56
  }
57
57
  }
package/structs/Memory.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import '../runtime/extensions';
2
2
 
3
3
  import { CString, type Pointer, ptr } from 'bun:ffi';
4
+
4
5
  import Kernel32, { INVALID_HANDLE_VALUE } from 'bun-kernel32';
5
6
 
6
7
  import type { Module, Point, QAngle, Quaternion, RGB, RGBA, Scratch, UPtr, UPtrArray, Vector2, Vector3, Vector4 } from '../types/Memory';
@@ -42,7 +43,7 @@ class Memory {
42
43
 
43
44
  const hSnapshot = Kernel32.CreateToolhelp32Snapshot(dwFlags, th32ProcessID);
44
45
 
45
- if (hSnapshot === -1) {
46
+ if (hSnapshot === -1n) {
46
47
  throw new Win32Error('CreateToolhelp32Snapshot', Kernel32.GetLastError());
47
48
  }
48
49
 
@@ -75,7 +76,7 @@ class Memory {
75
76
 
76
77
  const hProcess = Kernel32.OpenProcess(desiredAccess, inheritHandle, th32ProcessID);
77
78
 
78
- if (hProcess === 0) {
79
+ if (hProcess === 0n) {
79
80
  Kernel32.CloseHandle(hSnapshot);
80
81
 
81
82
  throw new Win32Error('OpenProcess', Kernel32.GetLastError());
@@ -161,7 +162,7 @@ class Memory {
161
162
 
162
163
  private static TextEncoderUTF8 = new TextEncoder('utf-8');
163
164
 
164
- private readonly hProcess: Pointer;
165
+ private readonly hProcess: bigint;
165
166
  private readonly th32ProcessID: number;
166
167
 
167
168
  /**