1
0
mirror of synced 2024-11-27 15:50:48 +01:00

fixed utf bug

This commit is contained in:
kohos 2020-03-08 11:33:49 +08:00
parent ddc10cf4a4
commit 735fe414ca

2
utf.js
View File

@ -376,7 +376,7 @@ async function viewUtf(acbPath, outputPath) {
console.log(`Parsing ${pathInfo.base}...`);
const buffer = await readFile(acbPath);
const utf = parseUtf(buffer, true);
if (utf.AwbFile && utf.AwbFile.length > 0x20) utf.AwbFile = utf.AwbFile.substring(0, 0x20);
if (utf && utf.AwbFile && utf.AwbFile.length > 0x20) utf.AwbFile = utf.AwbFile.substring(0, 0x20);
console.log(`Writing ${path.parse(outputPath).base}...`);
await writeFile(outputPath, JSON.stringify(utf, null, 2));
}