SDURLCache icon indicating copy to clipboard operation
SDURLCache copied to clipboard

dateFromHttpDateString: fixes

Open bazineta opened this issue 13 years ago • 1 comments

In datefromHttpDateString, the following two lines:

    if(((size_t)convertedCount != stringLength) || (usedBytes < 0L)) { return(NULL); }
    stringBuffer[convertedCount] = 0;

should instead be:

    if(((size_t)convertedCount != stringLength) || (usedBytes < 0L)) { return(nil); }
    stringBuffer[usedBytes] = '\0';

bazineta avatar Jan 07 '12 16:01 bazineta

Ah, you're right. John must have gotten that wrong. characters can be less than bytes used.

steipete avatar Apr 05 '12 00:04 steipete