summaryrefslogtreecommitdiffstats
path: root/main.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'main.cxx')
-rw-r--r--main.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/main.cxx b/main.cxx
index 0639f689..e18a1331 100644
--- a/main.cxx
+++ b/main.cxx
@@ -362,6 +362,14 @@ main (int argc, char * const argv [])
" characters [_a-zA-Z0-9])." << endl;
usage (s, 1);
}
+
+ // Make sure module name isn't too long.
+ if (s.module_name.size() >= (MODULE_NAME_LEN - 1))
+ {
+ s.module_name.resize(MODULE_NAME_LEN - 1);
+ cerr << "Truncating module name to '" << s.module_name
+ << "'" << endl;
+ }
}
cerr << "Warning: using '-m' disables cache support." << endl;