[Mobies-commit] [commit] r4118 - UDM/trunk/src/UML GME/Interpreter
ksmyth at redhat1.isis.vanderbilt.edu
ksmyth at redhat1.isis.vanderbilt.edu
Wed Oct 3 10:47:51 CDT 2012
Author: ksmyth
Date: Wed Oct 3 10:47:51 2012
New Revision: 4118
Log:
Fix crash on default string value of "" (literally "")
Modified:
UDM/trunk/src/UML GME/Interpreter/AttributeObject.cpp
Modified: UDM/trunk/src/UML GME/Interpreter/AttributeObject.cpp
==============================================================================
--- UDM/trunk/src/UML GME/Interpreter/AttributeObject.cpp Wed Oct 3 10:09:59 2012 (r4117)
+++ UDM/trunk/src/UML GME/Interpreter/AttributeObject.cpp Wed Oct 3 10:47:51 2012 (r4118)
@@ -463,10 +463,12 @@
s_i = s.begin();
}
- s_i = s.end() - 1;
- while (s.size() && *s_i == '"') {
- s.erase(s_i);
+ if (s.length()) {
s_i = s.end() - 1;
+ while (s.size() && *s_i == '"') {
+ s.erase(s_i);
+ s_i = s.end() - 1;
+ }
}
defval_tmp.push_back(s);
}
More information about the Mobies-commit
mailing list