Skip to content

Commit 7f7322b

Browse files
committed
Fixed uninitialised variables in case the ellipsoids weren't set.
1 parent 53918a0 commit 7f7322b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

geospatial.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,13 +385,14 @@ PHP_FUNCTION(decimal_to_dms)
385385
}
386386
/* }}} */
387387

388-
/* {{{ proto helmert(double x, double y, double z [, long from_reference_ellipsoid, long to_reference_ellipsoid])
389-
* Convert polar ones (latitude, longitude) tp cartesian co-ordiantes (x, y, z) */
388+
/* {{{ proto array helmert(double x, double y, double z [, long from_reference_ellipsoid, long to_reference_ellipsoid])
389+
* Convert cartesian co-ordinates between reference elipsoids */
390390
PHP_FUNCTION(helmert)
391391
{
392392
double x, y, z;
393393
geo_cartesian point;
394-
long from_reference_ellipsoid, to_reference_ellipsoid;
394+
long from_reference_ellipsoid = 0, to_reference_ellipsoid = 0;
395+
395396
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddd|ll", &x, &y, &z, &from_reference_ellipsoid, &to_reference_ellipsoid) == FAILURE) {
396397
return;
397398
}

0 commit comments

Comments
 (0)