aboutsummaryrefslogtreecommitdiff
path: root/src/processor/simple_symbol_supplier.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/processor/simple_symbol_supplier.cc')
-rw-r--r--src/processor/simple_symbol_supplier.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/processor/simple_symbol_supplier.cc b/src/processor/simple_symbol_supplier.cc
index 62800013..ca3805ce 100644
--- a/src/processor/simple_symbol_supplier.cc
+++ b/src/processor/simple_symbol_supplier.cc
@@ -110,8 +110,9 @@ SymbolSupplier::SymbolResult SimpleSymbolSupplier::GetSymbolFileAtPath(
// name ends in .pdb, strip the .pdb. Otherwise, add .sym to the non-.pdb
// name.
path.append("/");
- string debug_file_extension =
- debug_file_name.substr(debug_file_name.size() - 4);
+ string debug_file_extension;
+ if (debug_file_name.size() > 4)
+ debug_file_extension = debug_file_name.substr(debug_file_name.size() - 4);
transform(debug_file_extension.begin(), debug_file_extension.end(),
debug_file_extension.begin(), tolower);
if (debug_file_extension == ".pdb") {