Revision: 76878
http://sourceforge.net/p/brlcad/code/76878
Author: starseeker
Date: 2020-08-21 22:33:42 +0000 (Fri, 21 Aug 2020)
Log Message:
-----------
We need to do better than exact string lookup - replicate the old
_if_list[i]->if_name bu_strncmp check in the plugin test. Fixes rtwizard
preview and render.
Modified Paths:
--------------
brlcad/trunk/src/libdm/dm_plugins.cpp
Modified: brlcad/trunk/src/libdm/dm_plugins.cpp
===================================================================
--- brlcad/trunk/src/libdm/dm_plugins.cpp 2020-08-21 22:18:50 UTC (rev
76877)
+++ brlcad/trunk/src/libdm/dm_plugins.cpp 2020-08-21 22:33:42 UTC (rev
76878)
@@ -384,7 +384,11 @@
* else strip out "/path/devname" and try to look it up in the
* device array. If we don't find it assume it's a file.
*/
- f_it = fmb->find(std::string(file));
+ for (f_it = fmb->begin(); f_it != fmb->end(); f_it++) {
+ if (bu_strncmp(file, f_it->first.c_str(), strlen(f_it->first.c_str()))
== 0) {
+ break;
+ }
+ }
if (f_it != fmb->end()) {
const struct fb *f = f_it->second;
*ifp->i = *(f->i); /* struct copy */
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits