Siteshwar Vashisht bfa3f2
diff --git a/subst.c b/subst.c
Siteshwar Vashisht bfa3f2
--- a/subst.c
Siteshwar Vashisht bfa3f2
+++ b/subst.c
Siteshwar Vashisht bfa3f2
@@ -6240,7 +6240,7 @@ read_comsub (fd, quoted, flags, rflag)
Siteshwar Vashisht bfa3f2
 	  /* read a multibyte character from buf */
Siteshwar Vashisht bfa3f2
 	  /* punt on the hard case for now */
Siteshwar Vashisht bfa3f2
 	  memset (&ps, '\0', sizeof (mbstate_t));
Siteshwar Vashisht bfa3f2
-	  mblen = mbrtowc (&wc, bufp-1, bufn+1, &ps);
Siteshwar Vashisht bfa3f2
+	  mblen = mbrtowc (&wc, bufp-1, bufn, &ps);
Siteshwar Vashisht bfa3f2
 	  if (MB_INVALIDCH (mblen) || mblen == 0 || mblen == 1)
Siteshwar Vashisht bfa3f2
 	    istring[istring_index++] = c;
Siteshwar Vashisht bfa3f2
 	  else