Commit befaf5ef authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(get_map): Set result.first_local_no correctly if the map in the

	conference is completely empty.
parent 411fa5ac
/*
* $Id: text.c,v 0.54 1998/08/09 07:18:13 ceder Exp $
* $Id: text.c,v 0.55 1998/08/09 19:06:50 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -29,7 +29,7 @@
*/
static const char *
rcsid = "$Id: text.c,v 0.54 1998/08/09 07:18:13 ceder Exp $";
rcsid = "$Id: text.c,v 0.55 1998/08/09 19:06:50 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -3023,11 +3023,16 @@ get_map(Conf_no conf_no,
return FAILURE;
}
/* Get the lowest existing text, or, if no text exists, the next
text number that will be used. */
res_first = l2g_next_key(&conf_c->texts, 0);
/* Bug compatibility: accept first_local_no==0 because lyskomd
1.9.0 did so. */
res_first = max(res_first, 1);
if (res_first == 0)
res_first = l2g_first_appendable_key(&conf_c->texts);
/* Start where the user wants to start, unless that is too small. */
res_first = max(res_first, first_local_no);
/* Find the endpoint. */
first_unwanted = min(highest+1, first_local_no + no_of_texts);
if (first_unwanted >= res_first)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment