Skip to content
Snippets Groups Projects
Commit 09524d22 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

Correction of bug in List_LQuery (bad size of remaining list to be inspected)

(Mirroring bug fix from Patrick in GetDP)
parent 3d25dac7
No related branches found
No related tags found
No related merge requests found
// $Id: List.cpp,v 1.31 2004-06-16 17:57:07 geuzaine Exp $
// $Id: List.cpp,v 1.32 2004-10-06 14:39:19 geuzaine Exp $
//
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
//
......@@ -297,13 +297,14 @@ int List_LQuery(List_T * liste, void *data,
}
else {
if (startptr != NULL)
ptr = (char *)lolofind(data, startptr, liste->n, liste->size, fcmp);
ptr = (char *) lolofind(data,startptr,
liste->n - (startptr-liste->array)/liste->size,
liste->size,fcmp);
else
return(0);
}
if(ptr == NULL)
return (0);
if (ptr == NULL) return(0);
startptr = ptr + liste->size;
if ( startptr >= ( liste->array + liste->n * liste->size))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment