Commit 78f9b838 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(insert_loc_no): Fixed a memory access error introduced in last commit.

parent 9a54b2e2
/* /*
* $Id: membership.c,v 0.73 2002/11/06 18:40:28 ceder Exp $ * $Id: membership.c,v 0.74 2002/11/06 19:46:17 ceder Exp $
* Copyright (C) 1991-2002 Lysator Academic Computer Association. * Copyright (C) 1991-2002 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -580,7 +580,7 @@ insert_loc_no(Local_text_no text, ...@@ -580,7 +580,7 @@ insert_loc_no(Local_text_no text,
if (text == lo->last_read + 1) if (text == lo->last_read + 1)
{ {
if (lo != end && (lo+1)->first_read == text) if (lo != end && lo + 1 != end && (lo+1)->first_read == text)
return FAILURE; /* This text was already read. */ return FAILURE; /* This text was already read. */
lo->last_read = text; lo->last_read = text;
return OK; return OK;
......
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