- if (i +1 < text.length ())
- {
- if (text[i+1]=='\'' || text[i+1]=='`' || text[i+1]=='"'
- || text[i+1]=='^')
- {
- i++;
- break;
- }
- /* For string width \\ is a \ and \_ is a _. */
- if (text[i+1]=='\\' || text[i+1]=='_')
- break;
- }
-
- for (i++; (i < text.length ()) && !isspace (text[i])
+ if (i < text.length () - 1)
+ {
+ if (text[i + 1]=='\'' || text[i + 1]=='`' || text[i + 1]=='"'
+ || text[i + 1]=='^')
+ {
+ i++;
+ break;
+ }
+ /* For string width \\ is a \ and \_ is a _. */
+ if (text[i + 1]=='\\' || text[i + 1]=='_')
+ break;
+ }
+
+ for (i++; (i < text.length ()) && !isspace (text[i])