pdollar / toolbox

Piotr's Image & Video Matlab Toolbox
850 stars 499 forks source link

fix garbage dimensions on 64bit system #53

Open shi-yan opened 5 years ago

shi-yan commented 5 years ago

on a 64bit linux system (ubuntu 16), the function mxCreateMatrix3 fails to generate matrix with the correct dimensions. The issue is the use of int vs size_t. The function mxSetDimensions takes size_t as its inputs, but mxCreateMatrix3 passes int. on (my) 64bit system, int is 4 bytes, whereas size_t is 8 bytes. This caused garbage dimensions being assigned to the matrix.