fix user lenght

This commit is contained in:
CHIEFSOFT\ameye
2023-05-20 22:00:21 -04:00
parent 5d4a42297a
commit d53f1db9c2
+2 -3
View File
@@ -219,14 +219,13 @@ long WrenchFamilyInitializeAccount(CVars in, CVars &out){
const PGresult *res;
logfmt(logINFO, "WrenchFamilyInitializeAccount()");
char username[6] = "";
SetFamilyUsername(in["family_id"].Long(), username, sizeof (username));
char username[7] = "";
SetFamilyUsername(in["family_id"].Long(), username, 6);
int r1;
//srand(time(NULL));
r1 = 1000+(rand()%9000);
pgsql_exec("UPDATE members_family SET pin='%s' WHERE id=%lu", r1, in["family_id"].Long() );
load_db_record(out, "SELECT * FROM members_family WHERE id = %lu", in["family_id"].Long());
return 0;