From 4c18410a386ed1fa9ac2f593377eb2391141826c Mon Sep 17 00:00:00 2001 From: Gray <84999745+Milxnor@users.noreply.github.com> Date: Sat, 30 Mar 2024 08:57:45 -0400 Subject: [PATCH] i forgot if this fixes it --- Cobalt/curlhook.h | 14 +++++++++++--- Cobalt/dllmain.cpp | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Cobalt/curlhook.h b/Cobalt/curlhook.h index 523c4f1..7a48c1d 100644 --- a/Cobalt/curlhook.h +++ b/Cobalt/curlhook.h @@ -64,9 +64,17 @@ inline CURLcode CurlEasySetOptDetour(struct Curl_easy* data, CURLoption tag, ... if (bIsS13Epic) { - // this *should* work - uri.QueryString = ReplaceString(uri.QueryString.data(), "Windows", "IOS"); - url = ReplaceString(uri.QueryString.data(), "Windows", "IOS"); // Uhh this should be fine + if (!uri.QueryString.empty()) + { + // this *should* work + std::cout << "before query: " << uri.QueryString << '\n'; + uri.QueryString = ReplaceString(uri.QueryString.data(), "Windows", "IOS"); + std::cout << "after query: " << uri.QueryString << '\n'; + } + else + { + std::cout << "Empty query!\n"; + } } std::cout << "URL: " << uri.Host << uri.Path << '\n'; diff --git a/Cobalt/dllmain.cpp b/Cobalt/dllmain.cpp index 257e6e0..2b25e0d 100644 --- a/Cobalt/dllmain.cpp +++ b/Cobalt/dllmain.cpp @@ -1,3 +1,4 @@ + #include #include #include