Browse Source

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

nfactor-troky
ckolivas 14 years ago committed by Con Kolivas
parent
commit
d28f526b1e
  1. 3
      ocl.c

3
ocl.c

@ -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;

Loading…
Cancel
Save