summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
Diffstat (limited to 'load.c')
-rw-r--r--load.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/load.c b/load.c
index 8693aef8ae..8e66a75718 100644
--- a/load.c
+++ b/load.c
@@ -128,8 +128,8 @@ rb_feature_p(const char *feature, const char *ext, int rb, int expanded, const c
if (fn) *fn = 0;
if (ext) {
- len = ext - feature;
elen = strlen(ext);
+ len = strlen(feature) - elen;
type = rb ? 'r' : 's';
}
else {