# HG changeset patch # User Sebastien Jodogne # Date 1752057792 -7200 # Node ID 51a0e464e898a6b967c0e57b83530cade0ac9cd1 # Parent a93598f96cc15be26e7542911dac46a3bdc456c0 fix build on older compilers diff -r a93598f96cc1 -r 51a0e464e898 OrthancFramework/Sources/HttpServer/HttpServer.cpp --- a/OrthancFramework/Sources/HttpServer/HttpServer.cpp Wed Jul 09 12:28:12 2025 +0200 +++ b/OrthancFramework/Sources/HttpServer/HttpServer.cpp Wed Jul 09 12:43:12 2025 +0200 @@ -1255,7 +1255,8 @@ std::string redirectionToRoot; std::string tmp(requestUri); - if (tmp.back() == '/') + if (!tmp.empty() && + tmp[tmp.size() - 1] == '/') { redirectionToRoot = "../"; }