Fixed two bugs, both related to array overflow
parent
c26219e3d4
commit
2bf4c0ce5b
|
|
@ -43,7 +43,7 @@ namespace gtsam {
|
|||
|
||||
/* ************************************************************************* */
|
||||
Point3h point3h(double X, double Y, double Z, double W) {
|
||||
double data[3];
|
||||
double data[4];
|
||||
data[0] = X;
|
||||
data[1] = Y;
|
||||
data[2] = Z;
|
||||
|
|
@ -53,7 +53,7 @@ namespace gtsam {
|
|||
|
||||
/* ************************************************************************* */
|
||||
Plane3h plane3h(double a, double b, double c, double d) {
|
||||
double data[3];
|
||||
double data[4];
|
||||
data[0] = a;
|
||||
data[1] = b;
|
||||
data[2] = c;
|
||||
|
|
|
|||
|
|
@ -264,8 +264,8 @@ void svdcmp(double **a, int m, int n, double w[], double **v, bool sort) {
|
|||
}
|
||||
|
||||
if (sort) {
|
||||
int *indices1 = new int[n];
|
||||
int *indices2 = new int[n];
|
||||
int *indices1 = new int[n+1];
|
||||
int *indices2 = new int[n+1];
|
||||
for (int i1 = 1; i1 <= n; i1++) {
|
||||
indices1[i1] = i1;
|
||||
indices2[i1] = i1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue