mirror of
https://github.com/LBPUnion/UnionPatcher.git
synced 2025-04-23 13:05:17 +00:00
Check for trailing slash
This commit is contained in:
parent
153c1f206c
commit
a081d9b384
2 changed files with 5 additions and 0 deletions
|
@ -14,6 +14,10 @@ namespace UnionPatcher {
|
|||
}
|
||||
|
||||
public static byte[] PatchData(byte[] data, string serverUrl) {
|
||||
if(serverUrl.EndsWith('/')) {
|
||||
throw new ArgumentException("URL must not contain a trailing slash!");
|
||||
}
|
||||
|
||||
string dataAsString = Encoding.ASCII.GetString(data);
|
||||
|
||||
using MemoryStream ms = new(data);
|
||||
|
|
|
@ -23,6 +23,7 @@ namespace UnionPatcher {
|
|||
}
|
||||
|
||||
Patcher.PatchFile(args[0], args[1], args[2]);
|
||||
Console.WriteLine($"Successfully patched Server URL to {args[1]}.");
|
||||
}
|
||||
|
||||
public static void PrintHelp() {
|
||||
|
|
Loading…
Add table
Reference in a new issue