Commit 5a7127a9 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(fparse_read_range_0): Don't forget the first interval that is created

	based on last-text-read.
parent 6662d19a
/*
* $Id: ram-parse.c,v 0.50 2002/11/06 18:41:15 ceder Exp $
* $Id: ram-parse.c,v 0.51 2002/11/11 23:45:11 ceder Exp $
* Copyright (C) 1991, 1993-1999, 2001-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -479,8 +479,18 @@ fparse_read_range_0(FILE *fp,
no_of_read = fparse_long(fp);
sfree(mship->read_ranges);
mship->read_ranges = NULL;
mship->no_of_read_ranges = 0;
if (last_text_read == 0)
{
mship->read_ranges = NULL;
mship->no_of_read_ranges = 0;
}
else
{
mship->no_of_read_ranges = 1;
mship->read_ranges = smalloc(sizeof(mship->read_ranges[0]));
mship->read_ranges->first_read = 1;
mship->read_ranges->last_read = last_text_read;
}
if (no_of_read > 0)
{
......@@ -488,8 +498,8 @@ fparse_read_range_0(FILE *fp,
switch(getc(fp))
{
case '{':
n = 0;
tail = res = NULL;
n = mship->no_of_read_ranges;
tail = res = mship->read_ranges;
for (i = 0; i < no_of_read; i++)
{
......
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