|
6 | 6 |
|
7 | 7 | #define API_BASE_URL "https://offstyles.tommyy.dev/api" |
8 | 8 |
|
9 | | -#pragma dynamic 0x20000000 |
| 9 | +#pragma dynamic 104857600 |
10 | 10 | #pragma newdecls required |
11 | 11 | #pragma semicolon 1 |
12 | 12 |
|
@@ -191,15 +191,15 @@ void GetStyleMapping(bool forceRefresh = false) |
191 | 191 |
|
192 | 192 | if (fFile != null && fFile.Seek(0, SEEK_END)) |
193 | 193 | { |
194 | | - int iSize = (fFile.Position + 1); |
| 194 | + int iSize = fFile.Position; |
195 | 195 | fFile.Seek(0, SEEK_SET); |
196 | 196 |
|
197 | 197 | char[] sFileContents = new char[iSize + 1]; |
198 | | - fFile.ReadString(sFileContents, (iSize + 1), iSize); |
| 198 | + fFile.ReadString(sFileContents, iSize + 1, iSize); |
199 | 199 | delete fFile; |
200 | 200 |
|
201 | 201 | char[] sFileContentsEncoded = new char[iSize * 2]; |
202 | | - Crypt_Base64Encode(sFileContents, sFileContentsEncoded, (iSize * 2), iSize); |
| 202 | + Crypt_Base64Encode(sFileContents, sFileContentsEncoded, iSize * 2, iSize); |
203 | 203 |
|
204 | 204 | hJSONObject.SetString("data", sFileContentsEncoded); |
205 | 205 | } |
@@ -682,15 +682,15 @@ void SendRecordWithReplay(char[] sMap, char[] sSteamID, char[] sName, int sDate, |
682 | 682 |
|
683 | 683 | if (fFile != null && fFile.Seek(0, SEEK_END)) |
684 | 684 | { |
685 | | - int iSize = (fFile.Position + 1); |
| 685 | + int iSize = fFile.Position; |
686 | 686 | fFile.Seek(0, SEEK_SET); |
687 | 687 |
|
688 | 688 | char[] sFileContents = new char[iSize + 1]; |
689 | | - fFile.ReadString(sFileContents, (iSize + 1), iSize); |
| 689 | + fFile.ReadString(sFileContents, iSize + 1, iSize); |
690 | 690 | delete fFile; |
691 | 691 |
|
692 | 692 | char[] sFileContentsEncoded = new char[iSize * 2]; |
693 | | - Crypt_Base64Encode(sFileContents, sFileContentsEncoded, (iSize * 2), iSize); |
| 693 | + Crypt_Base64Encode(sFileContents, sFileContentsEncoded, iSize * 2, iSize); |
694 | 694 |
|
695 | 695 | hJSON.SetString("replayfile", sFileContentsEncoded); |
696 | 696 | DebugPrint("[OSdb] Replay file successfully encoded and attached"); |
|
0 commit comments