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

fix string allooc bug in gl2ps

parent d41f322e
No related branches found
No related tags found
No related merge requests found
// $Id: Scale.cpp,v 1.19 2001-05-03 00:09:42 geuzaine Exp $ // $Id: Scale.cpp,v 1.20 2001-08-06 12:26:26 geuzaine Exp $
#include "Gmsh.h" #include "Gmsh.h"
#include "GmshUI.h" #include "GmshUI.h"
...@@ -47,7 +47,7 @@ void draw_scale(Post_View *v, double xmin, double ymin, double *width, double he ...@@ -47,7 +47,7 @@ void draw_scale(Post_View *v, double xmin, double ymin, double *width, double he
double font_h, font_a, label_h; double font_h, font_a, label_h;
double cs_xmin, cs_ymin, cs_h, cs_w, cs_bh; double cs_xmin, cs_ymin, cs_h, cs_w, cs_bh;
double cv_xmin, cv_ymin, cv_h, cv_w, cv_bh; double cv_xmin, cv_ymin, cv_h, cv_w, cv_bh;
char label[128] ; char label[1024] ;
double Val, ValMin, ValMax; double Val, ValMin, ValMax;
font_h = CTX.gl_fontheight ; /* hauteur totale de la fonte */ font_h = CTX.gl_fontheight ; /* hauteur totale de la fonte */
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* GL2PS, an OpenGL to Postscript Printing Library * GL2PS, an OpenGL to Postscript Printing Library
* Copyright (C) 1999-2001 Christophe Geuzaine * Copyright (C) 1999-2001 Christophe Geuzaine
* *
* $Id: gl2ps.cpp,v 1.24 2001-06-28 15:16:09 geuzaine Exp $ * $Id: gl2ps.cpp,v 1.25 2001-08-06 12:26:26 geuzaine Exp $
* *
* E-mail: Christophe.Geuzaine@AdValvas.be * E-mail: Christophe.Geuzaine@AdValvas.be
* URL: http://www.geuz.org/gl2ps/ * URL: http://www.geuz.org/gl2ps/
...@@ -1371,7 +1371,7 @@ GLvoid gl2psText(char *str, char *fontname, GLint fontsize){ ...@@ -1371,7 +1371,7 @@ GLvoid gl2psText(char *str, char *fontname, GLint fontsize){
glGetFloatv(GL_CURRENT_RASTER_COLOR, prim->verts[0].rgba); glGetFloatv(GL_CURRENT_RASTER_COLOR, prim->verts[0].rgba);
prim->text = (GL2PSstring*)gl2psMalloc(sizeof(GL2PSstring)); prim->text = (GL2PSstring*)gl2psMalloc(sizeof(GL2PSstring));
if((len = strlen(str))){ if((len = strlen(str))){
prim->text->str = (char*)gl2psMalloc(len*sizeof(char)); prim->text->str = (char*)gl2psMalloc((len+1)*sizeof(char));
strcpy(prim->text->str, str); strcpy(prim->text->str, str);
} }
else else
......
// $Id: Skin.cpp,v 1.6 2001-08-06 11:13:25 geuzaine Exp $ // $Id: Skin.cpp,v 1.7 2001-08-06 12:26:26 geuzaine Exp $
#include "Plugin.h" #include "Plugin.h"
#include "Skin.h" #include "Skin.h"
...@@ -145,6 +145,7 @@ Post_View *GMSH_SkinPlugin::execute (Post_View *v) ...@@ -145,6 +145,7 @@ Post_View *GMSH_SkinPlugin::execute (Post_View *v)
Tree_Action(skin, addSTinView); Tree_Action(skin, addSTinView);
Tree_Delete(skin); Tree_Delete(skin);
char name[1024], filename[1024]; char name[1024], filename[1024];
sprintf(name,"skin-%s",vv->Name); sprintf(name,"skin-%s",vv->Name);
sprintf(filename,"skin-%s",vv->FileName); sprintf(filename,"skin-%s",vv->FileName);
......
$Id: VERSIONS,v 1.50 2001-08-06 09:46:15 geuzaine Exp $ $Id: VERSIONS,v 1.51 2001-08-06 12:26:26 geuzaine Exp $
New in 1.23: Better display of displacement maps; boundary operator New in 1.23: Better display of displacement maps; boundary operator
generalization; new explode option for post-processing views; enhanced generalization; new explode option for post-processing views; enhanced
link view behaviour (to update only the changed items); new default link view behaviour (to update only the changed items); new default
plugins: Skin, Transform, Smooth. plugins: Skin, Transform, Smooth; various other bug fixes, additions
and clean-ups;
New in 1.22: Fixed (yet another) bug for 2D mesh in the mean plane; New in 1.22: Fixed (yet another) bug for 2D mesh in the mean plane;
fixed surface coherence bug in extruded meshes; new double logarithmic fixed surface coherence bug in extruded meshes; new double logarithmic
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment