commit - 4d0cdff8c25cf6635991655a7e9b31a1271d4400
commit + 9b8c04bbdfa229d8e16272ccdc6c2f7ec1baffba
blob - b2d1806fddccb51efe26bc4ebf4dfa6579fd8a40
blob + c85ec0c139ea4270baf2b712bdeb12d85e85cd8d
--- FICS/playerdb.c
+++ FICS/playerdb.c
pp->timeOfReg = array[0];
pp->totalTime = array[1];
- if (pp->num_plan > MAX_PLAN) {
+ if (pp->num_plan >= MAX_PLAN) {
warnx("Player %s is corrupt\nToo many plans (%d)",
parray[p].name,
pp->num_plan);
return;
- } else if (pp->num_formula > MAX_FORMULA) {
+ } else if (pp->num_formula >= MAX_FORMULA) {
warnx("Player %s is corrupt\nToo many formulas (%d)",
parray[p].name,
pp->num_formula);
return;
- } else if (pp->numAlias > MAX_ALIASES) {
+ } else if (pp->numAlias >= MAX_ALIASES) {
warnx("Player %s is corrupt\nToo many aliases (%d)",
parray[p].name,
pp->numAlias);
* num_plan
*/
- if ((parray[p].num_plan = atoi(value)) > MAX_PLAN) {
+ if ((parray[p].num_plan = atoi(value)) >= MAX_PLAN) {
warnx("%s: %s: too many plans (%d)", __func__, file,
parray[p].num_plan);
return -1;
* num_formula
*/
- if ((parray[p].num_formula = atoi(value)) > MAX_FORMULA) {
+ if ((parray[p].num_formula = atoi(value)) >= MAX_FORMULA) {
warnx("%s: %s: too many formulas (%d)", __func__, file,
parray[p].num_formula);
return -1;
* num_alias
*/
- if ((parray[p].numAlias = atoi(value)) > MAX_ALIASES) {
+ if ((parray[p].numAlias = atoi(value)) >= MAX_ALIASES) {
warnx("%s: %s: too many aliases (%d)", __func__, file,
parray[p].numAlias);
return -1;