PDFdev is a service provided by PDFzone.com | http://www.pdfzone.com _____________________________________________________________
On 8 Jan 2004, at 20:24, Steve Bagley wrote:
ch = (strchr(digits, toupper(*p)) - digits); // Don't need to call strchr twice -- digits points to 0 alreadyThis should of course be *p++ not *p.
ch = ch << 4 | (strchr(digits, toupper(*p) - digits);
ch = ch << 4 | (strchr(digits, toupper(*p) - digits);
ch = ch << 4 | (strchr(digits, toupper(*p) - digits);
you'd also want to test to check you don't overflow the string buffer in production code
Steven
To change your subscription: http://www.pdfzone.com/discussions/lists-pdfdev.html
