From a4c59b67e8280ee59362f9ac71feb4c658718e6f Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 27 Jun 2001 19:26:58 +0000 Subject: [PATCH] don't allow leading digits in group names --- pandatool/src/xfile/xFileMaker.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandatool/src/xfile/xFileMaker.cxx b/pandatool/src/xfile/xFileMaker.cxx index 11d7cd0bc1..e345787d7f 100644 --- a/pandatool/src/xfile/xFileMaker.cxx +++ b/pandatool/src/xfile/xFileMaker.cxx @@ -437,6 +437,12 @@ make_nice_name(const string &str) { } } + if (!str.empty() && isdigit(str[0])) { + // If the name begins with a digit, we must make it begin with + // something else, like for instance an underscore. + result = '_' + result; + } + return result; }