mirror of
https://git.sanhost.net/sanasol/hytale-f2p
synced 2026-02-26 11:41:49 -03:00
Fix: Don't fallback to legacy mode when using skip list
When HYTALE_PATCH_SKIP is set, the legacy fallback was ignoring the skip list and patching all occurrences anyway. Now if skip list is active or HYTALE_NO_LEGACY_FALLBACK=1, the legacy fallback is disabled. Also found 4th occurrence at 0x1bc5d67 with metadata byte 0x89 that legacy mode was patching - this may be the crash culprit. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -584,6 +584,17 @@ class ClientPatcher {
|
|||||||
const { buffer: finalData, count: discordCount } = this.patchDiscordUrl(patchedData);
|
const { buffer: finalData, count: discordCount } = this.patchDiscordUrl(patchedData);
|
||||||
|
|
||||||
if (count === 0 && discordCount === 0) {
|
if (count === 0 && discordCount === 0) {
|
||||||
|
// Check if we're in debug mode with skip - don't fallback if intentionally skipping
|
||||||
|
const hasSkipList = (process.env.HYTALE_PATCH_SKIP || '').trim().length > 0;
|
||||||
|
const noLegacyFallback = process.env.HYTALE_NO_LEGACY_FALLBACK === '1';
|
||||||
|
|
||||||
|
if (hasSkipList || noLegacyFallback) {
|
||||||
|
console.log('No occurrences patched (skip list active or legacy fallback disabled)');
|
||||||
|
fs.writeFileSync(clientPath, patchedData);
|
||||||
|
this.markAsPatched(clientPath);
|
||||||
|
return { success: true, patchCount: 0, skipped: true };
|
||||||
|
}
|
||||||
|
|
||||||
console.log('No occurrences found - trying legacy UTF-16LE format...');
|
console.log('No occurrences found - trying legacy UTF-16LE format...');
|
||||||
|
|
||||||
// Fallback to legacy patching for older binary formats
|
// Fallback to legacy patching for older binary formats
|
||||||
|
|||||||
Reference in New Issue
Block a user