1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 15:27:53 +00:00

Need memmem in advance() to work properly for patching.

This commit is contained in:
ckolivas 2011-06-23 17:56:11 +10:00 committed by Con Kolivas
parent 19eea9067f
commit d28f526b1e

3
ocl.c
View File

@ -98,7 +98,8 @@ int clDevicesNum() {
void advance(char **area, unsigned *remaining, const char *marker) void advance(char **area, unsigned *remaining, const char *marker)
{ {
char *find = strstr(*area, marker); char *find = memmem(*area, *remaining, marker, strlen(marker));
if (!find) if (!find)
fprintf(stderr, "Marker \"%s\" not found\n", marker), exit(1); fprintf(stderr, "Marker \"%s\" not found\n", marker), exit(1);
*remaining -= find - *area; *remaining -= find - *area;