Author: sebor
Date: Mon Mar 26 13:25:09 2007
New Revision: 522614
URL: http://svn.apache.org/viewvc?view=rev&rev=522614
Log:
2007-03-26 Martin Sebor <[EMAIL PROTECTED]>
STDCXX-370
* def.cpp (convert_string): Removed the assumption that a string
that begins with the less-than sign also ends with a greater-than
sign.
Modified:
incubator/stdcxx/trunk/util/def.cpp
Modified: incubator/stdcxx/trunk/util/def.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/def.cpp?view=diff&rev=522614&r1=522613&r2=522614
==============================================================================
--- incubator/stdcxx/trunk/util/def.cpp (original)
+++ incubator/stdcxx/trunk/util/def.cpp Mon Mar 26 13:25:09 2007
@@ -283,14 +283,15 @@
// '<' marks the beginning of a symbolic name
// construct the name and look up its value in the cmap
if (str[idx] == '<') {
- while (str[idx] != '>') {
+ while (str [idx] && str [idx] != '>') {
if (str[idx] == scanner_.escape_char ())
idx++;
sym += str[idx++];
}
// this is safe because the while loop ended with *str == '>'
- sym += str[idx++];
+ if (str [idx])
+ sym += str [idx++];
w_cmap_iter w_pos = charmap_.get_w_cmap().find (sym);
if (w_pos != charmap_.get_w_cmap().end()) {