File tree Expand file tree Collapse file tree
libs/openFrameworks/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -452,10 +452,11 @@ class ofFilePath {
452452 // / \returns the App name as native string
453453 static const auto getAppName (bool strip_debug = true ) {
454454 auto name = ofFilePath::getCurrentExePathFS ().filename ().native ();
455- const std::filesystem::path::string_type debug_suffix = " Debug" ;
455+ typename std::filesystem::path::string_type debug_suffix = std::filesystem::path::string_type (" Debug" );
456+ auto dbsize = debug_suffix.size ();
456457 if (strip_debug) {
457- if (name.size () > 5 && name.compare (name.size () - 5 , 5 , debug_suffix) == 0 ) {
458- name.erase (name.size () - 5 );
458+ if (name.size () > dbsize && name.compare (name.size () -dbsize , dbsize , debug_suffix) == 0 ) {
459+ name.erase (name.size () - dbsize );
459460 }
460461 }
461462 return name;
You can’t perform that action at this time.
0 commit comments