From 25d9d8bac7a2d87a762e8c8a53593a81c1fef968 Mon Sep 17 00:00:00 2001 From: Dave Goodwin Date: Mon, 24 May 2004 00:12:10 +0000 Subject: [PATCH] *** empty log message *** --- Cantera/matlab/cantera/private/ctfunctions.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Cantera/matlab/cantera/private/ctfunctions.cpp b/Cantera/matlab/cantera/private/ctfunctions.cpp index ba85cbb31..5d3b0e968 100644 --- a/Cantera/matlab/cantera/private/ctfunctions.cpp +++ b/Cantera/matlab/cantera/private/ctfunctions.cpp @@ -7,8 +7,10 @@ #include void reportError() { - int buflen = 300; - char* output_buf = (char*)mxCalloc(buflen, sizeof(char)); + int buflen = 0; + char* output_buf = 0; + buflen = getCanteraError(buflen, output_buf); + output_buf = (char*)mxCalloc(buflen, sizeof(char)); getCanteraError(buflen, output_buf); mexErrMsgTxt(output_buf); } @@ -47,6 +49,7 @@ void ctfunctions( int nlhs, mxArray *plhs[], output_buf = (char*)mxCalloc(buflen, sizeof(char)); iok = getCanteraError(buflen, output_buf); plhs[0] = mxCreateString(output_buf); + iok = 0; return; // add directory