[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patch: crash when returning from mex file
From: |
Jens Restemeier |
Subject: |
patch: crash when returning from mex file |
Date: |
Fri, 13 Sep 2013 15:05:40 +0100 |
Hi,
I'm quite new to octave, and I didn't find a bugzilla or similar.
On my platform (OSX,PPC) I had a problem because sizeof(bool) !=
sizeof(mxLogical), so I was getting a memory overwrite in int_to_ov.
Easy fix:
--- mex.cc.orig 2013-09-13 14:42:59.000000000 +0100
+++ mex.cc 2013-09-13 14:46:43.000000000 +0100
@@ -1358,7 +1358,7 @@
switch (get_class_id ())
{
case mxLOGICAL_CLASS:
- retval = int_to_ov<bool, boolNDArray, bool> (dv);
+ retval = int_to_ov<mxLogical, boolNDArray, bool> (dv);
break;
case mxCHAR_CLASS:
That way it uses exactly the same source type as the mex file and the
mxArray use.
Jens
- patch: crash when returning from mex file,
Jens Restemeier <=