...
 
Commits (1)
......@@ -37,7 +37,6 @@
#include "sbbs.h"
#include "cmdshell.h"
#include <nspr.h>
extern "C" void client_on(SOCKET sock, client_t* client, BOOL update);
......@@ -243,10 +242,10 @@ bool sbbs_t::logon()
bprintf(text[TimeToChangePw],cfg.sys_pwdays);
c=0;
while(c < PR_MAX(RAND_PASS_LEN, cfg.min_pwlen)) { /* Create random password */
while(c < MAX(RAND_PASS_LEN, cfg.min_pwlen)) { /* Create random password */
str[c]=sbbs_random(43)+'0';
if(IS_ALPHANUMERIC(str[c]))
c++;
c++;
}
str[c]=0;
bprintf(text[YourPasswordIs],str);
......
......@@ -38,7 +38,6 @@
#include "sbbs.h"
#include "petdefs.h"
#include "cmdshell.h"
#include <nspr.h>
/****************************************************************************/
/* This function is invoked when a user enters "NEW" at the NN: prompt */
......@@ -382,7 +381,7 @@ BOOL sbbs_t::newuser()
}
else {
c=0;
while(c < PR_MAX(RAND_PASS_LEN, cfg.min_pwlen)) { /* Create random password */
while(c < MAX(RAND_PASS_LEN, cfg.min_pwlen)) { /* Create random password */
useron.pass[c]=sbbs_random(43)+'0';
if(IS_ALPHANUMERIC(useron.pass[c]))
c++;
......
......@@ -83,6 +83,13 @@ typedef struct js_callback {
#define JSVAL_NULL_OR_VOID(val) (JSVAL_IS_NULL(val) || JSVAL_IS_VOID(val))
#ifndef MAX
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#endif
#ifndef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
/************/
/* Maximums */
/************/
......