Browse Source

opencl: correctly test if no kernel name was specified in config.

Closes second bug squashed into https://github.com/veox/sgminer/issues/123
report.
build-mingw
Noel Maersk 11 years ago
parent
commit
0d8977774f
  1. 4
      ocl.c

4
ocl.c

@ -413,9 +413,9 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
char numbuf[16]; char numbuf[16];
char strbuf[255]; char strbuf[255];
if (strcmp(cgpu->kernelname, "") == 0) { if (cgpu->kernelname == NULL) {
applog(LOG_INFO, "No kernel specified, defaulting to ckolivas"); applog(LOG_INFO, "No kernel specified, defaulting to ckolivas");
strcpy(cgpu->kernelname, "ckolivas"); cgpu->kernelname = strdup("ckolivas");
} }
sprintf(strbuf, "%s.cl", cgpu->kernelname); sprintf(strbuf, "%s.cl", cgpu->kernelname);

Loading…
Cancel
Save