summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-03-11 20:07:22 -0700
committerJosh Stone <jistone@redhat.com>2009-03-11 20:11:28 -0700
commit139dee87b8824df4d7562a980e886a6e6f0b8308 (patch)
treecd273860698757e9045ef5f95346c1d461738f84 /tapsets.cxx
parent49462d1bcec68365e3ac96fc5c11c83ab7a8abd6 (diff)
downloadsystemtap-steved-139dee87b8824df4d7562a980e886a6e6f0b8308.tar.gz
systemtap-steved-139dee87b8824df4d7562a980e886a6e6f0b8308.tar.xz
systemtap-steved-139dee87b8824df4d7562a980e886a6e6f0b8308.zip
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.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx2
1 files changed, 1 insertions, 1 deletions
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.