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

changed initial alloc in ListRealloc
parent 813381b2
No related branches found
No related tags found
No related merge requests found
$Id: TODO,v 1.16 2004-09-01 00:58:47 geuzaine Exp $ $Id: TODO,v 1.17 2005-04-11 05:00:29 geuzaine Exp $
------------------------------------------------------------------------
* At last, after so many help requests, I have a small contribution -- * At last, after so many help requests, I have a small contribution --
rotated text in ps output. Actually, I just figured out the ps code, rotated text in ps output. Actually, I just figured out the ps code,
......
/* $Id: gl2ps.c,v 1.205 2005-03-22 07:45:33 geuzaine Exp $ */ /* $Id: gl2ps.c,v 1.206 2005-04-11 05:00:29 geuzaine Exp $ */
/* /*
* GL2PS, an OpenGL to PostScript Printing Library * GL2PS, an OpenGL to PostScript Printing Library
* Copyright (C) 1999-2005 Christophe Geuzaine <geuz@geuz.org> * Copyright (C) 1999-2005 Christophe Geuzaine <geuz@geuz.org>
...@@ -483,7 +483,7 @@ static void gl2psListRealloc(GL2PSlist *list, GLint n) ...@@ -483,7 +483,7 @@ static void gl2psListRealloc(GL2PSlist *list, GLint n)
} }
if(n <= 0) return; if(n <= 0) return;
if(!list->array){ if(!list->array){
list->nmax = ((n - 1) / list->incr + 1) * list->incr; list->nmax = n;
list->array = (char*)gl2psMalloc(list->nmax * list->size); list->array = (char*)gl2psMalloc(list->nmax * list->size);
} }
else{ else{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment