Browse Source

Fix error compiling with pre-C++11 compilers

rdb 9 years ago
parent
commit
7676104f4c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      panda/src/downloader/urlSpec.cxx

+ 1 - 1
panda/src/downloader/urlSpec.cxx

@@ -47,7 +47,7 @@ URLSpec(const URLSpec &url, const Filename &path) {
     string dirname = get_path();
     string dirname = get_path();
 
 
     // Check if the path already ends in a slash.
     // Check if the path already ends in a slash.
-    if (!dirname.empty() && dirname.back() == '/') {
+    if (!dirname.empty() && dirname[dirname.size() - 1] == '/') {
       if (path[0] == '/') {
       if (path[0] == '/') {
         // And the filename begins with one.  Remove the extra slash.
         // And the filename begins with one.  Remove the extra slash.
         dirname.resize(dirname.size() - 1);
         dirname.resize(dirname.size() - 1);