diff libinterp/corefcn/load-path.cc @ 25376:cc40e47d3a44 stable

track multiple file types (oct|m|mex) for private functions (bug #53856) * load-path.cc (get_fcn_files): Correctly track multiple function file types for the same function name.
author John W. Eaton <jwe@octave.org>
date Tue, 15 May 2018 01:08:38 -0400
parents c8f49ee7a687
children b75d55b3dbb7 7a507e71d922
line wrap: on
line diff
--- a/libinterp/corefcn/load-path.cc	Mon May 14 20:41:59 2018 -0400
+++ b/libinterp/corefcn/load-path.cc	Tue May 15 01:08:38 2018 -0400
@@ -1099,7 +1099,15 @@
                       t = load_path::MEX_FILE;
 
                     if (t)
-                      retval[base] = t;
+                      {
+                        load_path::dir_info::fcn_file_map_iterator p
+                          = retval.find (base);
+
+                        if (p == retval.end ())
+                          retval[base] = t;
+                        else
+                          p->second |= t;
+                      }
                   }
               }
           }