* Bug #13468 fixed - Fileio: Scilab hanged when incorrect format was used for file...
[scilab.git] / scilab / modules / fileio / sci_gateway / cpp / sci_mfscanf.cpp
index 0c74712..f50ac99 100644 (file)
@@ -128,6 +128,10 @@ types::Function::ReturnValue sci_mfscanf(types::typed_list &in, int _iRetCount,
 
         // get data
         int err = do_xxscanf(L"mfscanf", fDesc, wcsFormat, &args, NULL, &retval, buf, type);
+        if (err == DO_XXPRINTF_MISMATCH)
+        {
+            break;
+        }
         if (err < 0)
         {
             return types::Function::Error;