PublicIP: fixes invalid URL parser

This commit is contained in:
Carter Li
2026-07-28 10:37:36 +08:00
parent 6490e2707f
commit 4f0b00116e
+2 -3
View File
@@ -34,9 +34,8 @@ void ffPreparePublicIp(FFPublicIPOptions* options) {
FF_STRBUF_AUTO_DESTROY path = ffStrbufCreate();
if (pathStartIndex != host.length) {
ffStrbufAppendNS(&path, pathStartIndex, host.chars + (host.length - pathStartIndex));
host.length = pathStartIndex;
host.chars[pathStartIndex] = '\0';
ffStrbufAppendNS(&path, host.length - pathStartIndex, host.chars + pathStartIndex);
ffStrbufSubstrBefore(&host, pathStartIndex);
}
*status = ffNetworkingSendHttpRequest(state, host.chars, path.length == 0 ? "/" : path.chars, nullptr);