Tue 26 Apr 2016 05:20:24 PM UTC, comment #2:
I tried an mxe-build with your patch on Windows 10 with the following results:
So the original issue seems to be solved with your patch.
|
Sat 23 Apr 2016 08:54:16 AM UTC, comment #1:
Matlab does not emit an error message on integer overflow:
For completeness, the same for "%ld" and %lx":
No error message either.
Maybe, mark the respective place in the code anyway stating this is Matlab's behavior. When this would be possible in the future, one might want to emit an error message anyway?
|
Fri 22 Apr 2016 03:04:08 AM UTC, original submission:
According to tests in bug #47741, Matlab returns the minimum or maximum integer value if the converted value overflows the storage limit of a 32-bit integer (or 64-bit integer if %ld is used).
Octave currently stops conversion when it encounters a value that is out of range.
Does Matlab also return an errmsg string when a value overflows? What does Matlab do for the following:
The attached diff fixes the bug so overflow values are returned as the min/max value possible and conversion continues with the next value, but does not set errmsg. See also bug #46493 for why we can't currently set errmsg on success, but we can at least mark it as something to fix later for compatibility.
|