mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 15:04:52 +09:00
Convert ArrayBufferLike to Buffer
This commit is contained in:
1 parent
59709280da
commit
10a87d47da
2 files changed
+2
-2
No files matched your search
@@ -218,7 +218,7 @@ export default class ModPack {
|
||||
let buf = Buffer.from(modPackString, "base64");
|
||||
try {
|
||||
// eslint-disable-next-line node/no-sync
|
||||
buf = zlib.inflateSync(buf);
|
||||
buf = Buffer.from(zlib.inflateSync(buf));
|
||||
} catch (err: any) {
|
||||
if (err.code.startsWith("Z_")) {
|
||||
throw new Error("Malformed mod pack string: zlib inflate failed");
|
||||
|
||||
@@ -414,7 +414,7 @@ export function readMapExchangeString(exchangeString: string) {
|
||||
let buf = Buffer.from(exchangeString.slice(3, -3), "base64");
|
||||
try {
|
||||
// eslint-disable-next-line node/no-sync
|
||||
buf = zlib.inflateSync(buf);
|
||||
buf = Buffer.from(zlib.inflateSync(buf));
|
||||
} catch (err: any) {
|
||||
if (err.code.startsWith("Z_")) {
|
||||
throw new Error("Malformed map exchange string: zlib inflate failed");
|
||||
|
||||
Reference in new issue
Block a user