reduced size to 32 blablabla yes the usual things sql error nairda

This commit is contained in:
shavit 2018-06-26 19:30:18 +03:00
parent 6ccecd8014
commit b6ca23d9f0
2 changed files with 4 additions and 3 deletions

View File

@ -26,6 +26,7 @@
#define SHAVIT_VERSION "2.2.0"
#define STYLE_LIMIT 256
#define MAX_ZONES 64
#define MAX_NAME_LENGTH_SQL 32
// HUD
#define HUD_NONE (0)

View File

@ -1400,9 +1400,9 @@ public void OnClientPutInServer(int client)
return;
}
char[] sName = new char[MAX_NAME_LENGTH];
GetClientName(client, sName, MAX_NAME_LENGTH);
ReplaceString(sName, MAX_NAME_LENGTH, "#", "?"); // to avoid this: https://user-images.githubusercontent.com/3672466/28637962-0d324952-724c-11e7-8b27-15ff021f0a59.png
char[] sName = new char[MAX_NAME_LENGTH_SQL];
GetClientName(client, sName, MAX_NAME_LENGTH_SQL);
ReplaceString(sName, MAX_NAME_LENGTH_SQL, "#", "?"); // to avoid this: https://user-images.githubusercontent.com/3672466/28637962-0d324952-724c-11e7-8b27-15ff021f0a59.png
int iLength = ((strlen(sName) * 2) + 1);
char[] sEscapedName = new char[iLength];