bun-memory 1.1.8 → 1.1.9
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
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"url": "git://github.com/obscuritysrl/bun-memory.git"
|
|
23
23
|
},
|
|
24
24
|
"type": "module",
|
|
25
|
-
"version": "1.1.
|
|
25
|
+
"version": "1.1.9",
|
|
26
26
|
"main": "./index.ts",
|
|
27
27
|
"keywords": [
|
|
28
28
|
"bun",
|
|
@@ -46,5 +46,6 @@
|
|
|
46
46
|
],
|
|
47
47
|
"engines": {
|
|
48
48
|
"bun": ">=1.1.0"
|
|
49
|
-
}
|
|
49
|
+
},
|
|
50
|
+
"types": "types/global.d.ts"
|
|
50
51
|
}
|
package/structs/Memory.ts
CHANGED
|
@@ -363,7 +363,7 @@ class Memory {
|
|
|
363
363
|
|
|
364
364
|
this.ScratchModuleEntry32W.writeUInt32LE(0x438 /* sizeof(MODULEENTRY32W) */);
|
|
365
365
|
|
|
366
|
-
const lpme = this.ScratchModuleEntry32W
|
|
366
|
+
const lpme = this.ScratchModuleEntry32W;
|
|
367
367
|
|
|
368
368
|
const bModule32FirstW = Kernel32.Module32FirstW(hSnapshot, lpme);
|
|
369
369
|
|
|
@@ -376,9 +376,9 @@ class Memory {
|
|
|
376
376
|
const modules: Memory['_modules'] = {};
|
|
377
377
|
|
|
378
378
|
do {
|
|
379
|
-
const modBaseAddr =
|
|
380
|
-
const modBaseSize =
|
|
381
|
-
const szModule =
|
|
379
|
+
const modBaseAddr = lpme.readBigUInt64LE(0x18);
|
|
380
|
+
const modBaseSize = lpme.readUInt32LE(0x20);
|
|
381
|
+
const szModule = lpme.toString('utf16le', 0x30, 0x230).replace(/\0+$/, '');
|
|
382
382
|
|
|
383
383
|
modules[szModule] = Object.freeze({ base: modBaseAddr, name: szModule, size: modBaseSize });
|
|
384
384
|
} while (Kernel32.Module32NextW(hSnapshot, lpme));
|
|
File without changes
|