*** sh.lex.c.org	2004-12-26 06:15:07.000000000 +0900
--- sh.lex.c	2007-11-20 16:51:52.000000000 +0900
***************
*** 1716,1722 ****
  	    len = normal_mbtowc(buf + res, cbuf + i, partial - i);
  	    if (len == -1) {
  	        reset_mbtowc();
! 		if (partial < MB_LEN_MAX && r > 0)
  		    /* Maybe a partial character and there is still a chance
  		       to read more */
  		    break;
--- 1716,1722 ----
  	    len = normal_mbtowc(buf + res, cbuf + i, partial - i);
  	    if (len == -1) {
  	        reset_mbtowc();
! 		if ((partial - i) < MB_LEN_MAX && r > 0)
  		    /* Maybe a partial character and there is still a chance
  		       to read more */
  		    break;
