From e84110874abc0c2211c4f4e73a7496120e7f1af8 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Wed, 7 Jul 2004 15:53:11 +0000 Subject: [PATCH] Added error display if max. number of attribute options gets exceeded SVN revision: 942 --- src/elogd.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/elogd.c b/src/elogd.c index 9a9f4595..c4cb45e4 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.371 2004/07/07 15:53:11 midas + Added error display if max. number of attribute options gets exceeded + Revision 1.370 2004/07/07 15:10:50 midas Omit 'preset text' on edit of entries @@ -14759,6 +14762,16 @@ void submit_elog(LOGBOOK * lbs) if (!attr_options[i][j][0] && *getparam(ua)) { if (attr_flags[i] & AF_EXTENDABLE) { + + /* check if maximal number of options exceeded */ + if (attr_options[i][MAX_N_LIST-1][0]) { + strcpy(error, loc("Maximum number of attribute options exceeded")); + strcat(error, "
"); + strcat(error, loc("Please increase MAX_N_LIST in elogd.c and recompile")); + show_error(error); + return; + } + if (!add_attribute_option(lbs, attr_list[i], getparam(ua))) return; } else {