#include "webcit.h"
-char floorlist[128][SIZ]; /**< list of our floor names */
+#define MAX_FLOORS 128
+char floorlist[MAX_FLOORS][SIZ]; /**< list of our floor names */
char *viewdefs[9]; /**< the different kinds of available views */
int a;
char buf[SIZ];
- for (a = 0; a < 128; ++a)
+ for (a = 0; a < MAX_FLOORS; ++a)
floorlist[a][0] = 0;
serv_puts("LFLR");
* Otherwise, prefix the floor name as a "public folders" moniker
*/
else {
- sprintf(folder, "%s|%s", floorlist[floor], room);
+ if (floor > MAX_FLOORS) {
+ wc_backtrace ();
+ sprintf(folder, "%%%%%|%s", room);
+ }
+ else {
+ sprintf(folder, "%s|%s", floorlist[floor], room);
+ }
}
/**