From 139dee87b8824df4d7562a980e886a6e6f0b8308 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 11 Mar 2009 20:07:22 -0700 Subject: Fix @cast module splitting The new semok testcase exposed that the module splitting wasn't properly setting substr boundaries. Instead of passing the end position, it's supposed to pass the number of characters (end - begin). Oops. --- tapsets.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tapsets.cxx b/tapsets.cxx index dce73534..7f6ca721 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -5017,7 +5017,7 @@ void dwarf_cast_expanding_visitor::visit_cast_op (cast_op* e) // split the module string by ':' for alternatives size_t mod_begin = mod_end + 1; mod_end = e->module.find(':', mod_begin); - string module = e->module.substr(mod_begin, mod_end); + string module = e->module.substr(mod_begin, mod_end - mod_begin); // NB: This uses '/' to distinguish between kernel modules and userspace, // which means that userspace modules won't get any PATH searching. -- cgit