aboutsummaryrefslogtreecommitdiff
path: root/build/parser.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build/parser.cxx')
-rw-r--r--build/parser.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/build/parser.cxx b/build/parser.cxx
index 1cb0684..d1f3d8a 100644
--- a/build/parser.cxx
+++ b/build/parser.cxx
@@ -242,12 +242,12 @@ namespace build
// Extract extension.
//
- string::size_type j (n.rfind ('.'));
+ string::size_type j (path::traits::find_extension (n));
if (j != string::npos)
{
- e = &extension_pool.find (n.c_str () + j + 1);
- n.resize (j);
+ e = &extension_pool.find (n.c_str () + j);
+ n.resize (j - 1);
}
}
@@ -318,12 +318,12 @@ namespace build
// Extract extension.
//
- string::size_type j (n.rfind ('.'));
+ string::size_type j (path::traits::find_extension (n));
if (j != string::npos)
{
- e = &extension_pool.find (n.c_str () + j + 1);
- n.resize (j);
+ e = &extension_pool.find (n.c_str () + j);
+ n.resize (j - 1);
}
}