char* pipeIndex;
int stringLength;
- GlobalSettings::isVerbose() && fprintf(stderr, "[%s:%d] trying to parse “%s”...\n", __FILE__, __LINE__, buffer);
+ GlobalSettings::isVerbose() && fprintf(stderr, "[%s:%d] trying to parse “%s”...\n", __FILE__, __LINE__, tempBuffer);
- if (strncmp("ed2k://|file|", buffer, 13)) {
+ if (strncmp("ed2k://|file|", tempBuffer, 13)) {
+ GlobalSettings::isVerbose() && fprintf(stderr, "[%s:%d] line does not start with “ed2k://|file|”!\n", __FILE__, __LINE__);
return NULL;
}
stringLength = (char*) pipeIndex - tempBuffer;
filename = (char*) malloc(stringLength + 1);
memcpy(filename, tempBuffer, stringLength);
- sizeString[stringLength] = '\0';
+ filename[stringLength] = '\0';
tempBuffer = pipeIndex + 1;
GlobalSettings::isVerbose() && fprintf(stderr, "[%s:%d] parsed filename: “%s”.\n", __FILE__, __LINE__, filename);