xp = (const unsigned char *)PyString_AS_STRING(me);
xsz = PyString_GET_SIZE(me);
- if (n < 0 || xsz >= (size_t)-1/n) VALERR("too long");
+ if (n < 0 || (n && xsz >= (size_t)-1/n)) VALERR("too long");
zsz = n*xsz; z = bytestring_pywrap(0, zsz); zp = PyString_AS_STRING(z);
if (xsz == 1) memset(zp, *xp, zsz);
else while (zsz) { memcpy(zp, xp, xsz); zp += xsz; zsz -= xsz; }