Răsfoiți Sursa

Fix short userfile storage

Bryan Drewery 6 ani în urmă
părinte
comite
7fecd4fb63
2 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 1 1
      src/chanprog.cc
  2. 1 1
      src/users.cc

+ 1 - 1
src/chanprog.cc

@@ -593,7 +593,7 @@ void chanprog()
   channel_add(NULL, "default", def_chanset, 1);
 
   if (conf.bot->hub) {
-    simple_snprintf(userfile, 121, "%s/.u", bindir);
+    simple_snprintf(userfile, PATH_MAX, "%s/.u", bindir);
     loading = 1;
     checkchans(0);
     readuserfile(userfile, &userlist);

+ 1 - 1
src/users.cc

@@ -56,7 +56,7 @@
 #include "misc_file.h"
 #include "EncryptedStream.h"
 
-char userfile[121] = "";	/* where the user records are stored */
+char userfile[PATH_MAX] = "";	/* where the user records are stored */
 char autolink_failed[HANDLEN + 1] = "";
 interval_t ignore_time = 10;		/* how many minutes will ignores last? */
 bool	dont_restructure = 0;		/* set when we botlink() to a hub with +U, only stops bot from restructuring */