git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8230
d7cf8633-e32d-0410-b094-
e92efae38249
line[i++] = '\\';
line[i++] = 'r';
}
+ else if (*s == '\\')
+ {
+ line[i++] = '\\';
+ line[i++] = '\\';
+ }
else
line[i++] = *s;
s++;
val->string = PRVM_AllocString(l, &new_p);
for (i = 0;i < l;i++)
{
- if (s[i] == '\\' && s[i+1] == 'n' && parsebackslash)
+ if (s[i] == '\\' && s[i+1] && parsebackslash)
{
i++;
- *new_p++ = '\n';
- }
- else if (s[i] == '\\' && s[i+1] == 'r' && parsebackslash)
- {
- i++;
- *new_p++ = '\r';
+ if (s[i] == 'n')
+ *new_p++ = '\n';
+ else if (s[i] == 'r')
+ *new_p++ = '\r';
+ else
+ *new_p++ = s[i];
}
else
*new_p++ = s[i];