-/* $Id: nurbsutl.c,v 1.2 2000/07/11 14:11:04 brianp Exp $ */
/*
* Mesa 3-D graphics library
knot_str_type * normal_knot, knot_str_type * texture_knot,
GLfloat maximal_min_knot, GLfloat minimal_max_knot)
{
- GLuint t_min, t_max, cnt;
+ GLuint t_min = 0, t_max = 0, cnt = 0;
if (minimal_max_knot - maximal_min_knot < EPSILON) {
/* knot common range empty */
/* alloc space for new_knot */
if (
(new_knot =
- (GLfloat *) malloc(sizeof(GLfloat) * (nknots + n_new_knots))) == NULL) {
+ (GLfloat *) malloc(sizeof(GLfloat) * (nknots + n_new_knots + 1))) == NULL) {
return GLU_OUT_OF_MEMORY;
}
/* fill in new knot */