ossp-pkg/var/var.c 1.3 -> 1.4
--- var.c 2001/11/13 12:45:49 1.3
+++ var.c 2001/11/13 13:25:18 1.4
@@ -364,10 +364,26 @@
case '7':
case '8':
case '9':
- if ((rc = expand_octal(&src, &dst, end)) != 0)
- return rc;
- break;
+ if (!unescape_all)
+ {
+ if (end - src >= 3 && isdigit(src[1]) && isdigit(src[2]))
+ {
+ if ((rc = expand_octal(&src, &dst, end)) != 0)
+ return rc;
+ break;
+ }
+ }
+ else
+ {
+ if ((rc = expand_octal(&src, &dst, end)) != 0)
+ return rc;
+ break;
+ }
default:
+ if (!unescape_all)
+ {
+ *dst++ = '\\';
+ }
*dst++ = *src;
}
++src;
|
|