Commit d3b316e2 authored by Per Cederqvist's avatar Per Cederqvist

(foutput_text_list): Handle empty text lists properly.

parent 1978cff9
/* /*
* $Id: ram-output.c,v 0.25 1998/07/26 16:43:56 ceder Exp $ * $Id: ram-output.c,v 0.26 1998/08/22 21:31:43 ceder Exp $
* Copyright (C) 1991, 1993, 1994, 1995, 1996 Lysator Academic Computer Association. * Copyright (C) 1991, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
*/ */
static const char * static const char *
rcsid = "$Id: ram-output.c,v 0.25 1998/07/26 16:43:56 ceder Exp $"; rcsid = "$Id: ram-output.c,v 0.26 1998/08/22 21:31:43 ceder Exp $";
#include "rcs.h" #include "rcs.h"
USE(rcsid); USE(rcsid);
...@@ -567,9 +567,10 @@ foutput_text_list(FILE *fp, ...@@ -567,9 +567,10 @@ foutput_text_list(FILE *fp,
Local_text_no end; Local_text_no end;
first = l2g_next_key(text_list, 0); first = l2g_next_key(text_list, 0);
if (first == 0)
first = 1;
end = l2g_first_appendable_key(text_list); end = l2g_first_appendable_key(text_list);
if (first == 0)
first = end;
foutput_ulong((unsigned long)first, fp); foutput_ulong((unsigned long)first, fp);
foutput_ulong((unsigned long)(end - first), fp); foutput_ulong((unsigned long)(end - first), fp);
......
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