Tiny change in copying of buffer.

This commit is contained in:
Sterling Hughes 2000-10-02 04:55:26 +00:00
parent eac689a606
commit 82070f1cdf

View file

@ -552,7 +552,7 @@ PHP_FUNCTION(curl_exec)
ret_data = emalloc(stat_sb.st_size+1); ret_data = emalloc(stat_sb.st_size+1);
while ((b = fread(buf, 1, sizeof(buf), fp)) > 0) { while ((b = fread(buf, 1, sizeof(buf), fp)) > 0) {
memcpy(&(ret_data[pos]), buf, b); memcpy(ret_data + pos, buf, b);
pos += b; pos += b;
} }
ret_data[stat_sb.st_size - 1] = '\0'; ret_data[stat_sb.st_size - 1] = '\0';