# # # patch "sanity.cc" # from [9239c106c34e6fc9d81f414f686041b099f39a67] # to [b9e8aa280877f8b0235fb135d55b5cf66f2e8d8f] # ============================================================ --- sanity.cc 9239c106c34e6fc9d81f414f686041b099f39a67 +++ sanity.cc b9e8aa280877f8b0235fb135d55b5cf66f2e8d8f @@ -126,7 +126,7 @@ sanity::initialize(int argc, char ** arg // this does not bother with conversion to utf8. { string av0 = argv[0]; - if (av0.rfind(".exe") == av0.size() - 4) + if (av0.size() > 4 && av0.rfind(".exe") == av0.size() - 4) av0.erase(av0.size() - 4); string::size_type last_slash = av0.find_last_of("/\\"); if (last_slash != string::npos)