1 files changed, 2 insertions, 0 deletions
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
");
|