diff options
Diffstat (limited to 'third_party/lcms2-2.6/src')
-rw-r--r-- | third_party/lcms2-2.6/src/cmslut.c | 6 | ||||
-rw-r--r-- | third_party/lcms2-2.6/src/cmstypes.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/third_party/lcms2-2.6/src/cmslut.c b/third_party/lcms2-2.6/src/cmslut.c index 8d5aa60bfb..9b0eb4b549 100644 --- a/third_party/lcms2-2.6/src/cmslut.c +++ b/third_party/lcms2-2.6/src/cmslut.c @@ -391,7 +391,7 @@ cmsStage* CMSEXPORT cmsStageAllocMatrix(cmsContext ContextID, cmsUInt32Number R if (n >= UINT_MAX / Rows) return NULL; if (n < Rows || n < Cols) return NULL; - NewMPE = _cmsStageAllocPlaceholder(ContextID, cmsSigMatrixElemType, Rows, Cols, + NewMPE = _cmsStageAllocPlaceholder(ContextID, cmsSigMatrixElemType, Cols, Rows, EvaluateMatrix, MatrixElemDup, MatrixElemTypeFree, NULL ); if (NewMPE == NULL) return NULL; @@ -414,13 +414,13 @@ cmsStage* CMSEXPORT cmsStageAllocMatrix(cmsContext ContextID, cmsUInt32Number R if (Offset != NULL) { - NewElem ->Offset = (cmsFloat64Number*) _cmsCalloc(ContextID, Cols, sizeof(cmsFloat64Number)); + NewElem ->Offset = (cmsFloat64Number*) _cmsCalloc(ContextID, Rows, sizeof(cmsFloat64Number)); if (NewElem->Offset == NULL) { MatrixElemTypeFree(NewMPE); return NULL; } - for (i=0; i < Cols; i++) { + for (i=0; i < Rows; i++) { NewElem ->Offset[i] = Offset[i]; } diff --git a/third_party/lcms2-2.6/src/cmstypes.c b/third_party/lcms2-2.6/src/cmstypes.c index 6f335d9bb1..15199c7084 100644 --- a/third_party/lcms2-2.6/src/cmstypes.c +++ b/third_party/lcms2-2.6/src/cmstypes.c @@ -4225,7 +4225,7 @@ void *Type_MPEmatrix_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io } - mpe = cmsStageAllocMatrix(self ->ContextID, InputChans, OutputChans, Matrix, Offsets); + mpe = cmsStageAllocMatrix(self ->ContextID, OutputChans, InputChans, Matrix, Offsets); _cmsFree(self ->ContextID, Matrix); _cmsFree(self ->ContextID, Offsets); |