From 4540b4e4d897d60e6cbdecf4ce712ebb72090ae2 Mon Sep 17 00:00:00 2001 From: Rory& Date: Sat, 2 May 2026 13:28:26 +0200 Subject: Update various patches --- .../Patches/Implementations/JSPatches/DisableSciencePatch.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ReferenceClientProxyImplementation/Patches/Implementations/JSPatches/DisableSciencePatch.cs') diff --git a/ReferenceClientProxyImplementation/Patches/Implementations/JSPatches/DisableSciencePatch.cs b/ReferenceClientProxyImplementation/Patches/Implementations/JSPatches/DisableSciencePatch.cs index c44bf95..2e1c102 100644 --- a/ReferenceClientProxyImplementation/Patches/Implementations/JSPatches/DisableSciencePatch.cs +++ b/ReferenceClientProxyImplementation/Patches/Implementations/JSPatches/DisableSciencePatch.cs @@ -13,6 +13,8 @@ public partial class DisableSciencePatch : IPatch { var stringContent = Encoding.UTF8.GetString(content); var match = HandleTrackDefinitionRegex().Match(stringContent); + if (match.Length == 0) return content; + Console.WriteLine($"DisableSciencePatch: found science at {match.Index}(+{match.Length})"); stringContent = stringContent.Insert(match.Index + match.Length, @" return (new Promise(() => { }), false); // ReferenceClientProxyImplementation: Disable /science calls "); -- cgit 1.5.1