Commit 4531d0ed authored by Erik Faye-Lund's avatar Erik Faye-Lund
Browse files

output error-string for stdlib, if any


Signed-off-by: default avatarErik Faye-Lund <kusmabite@gmail.com>
parent 6fa4c9ca
......@@ -32,7 +32,12 @@ static struct pimp_module *load_module(const char *filename, struct pimp_sample_
if (NULL == mod) mod = load_module_mod(fp, sample_bank);
/* report error if any */
if (NULL == mod) fprintf(stderr, "%s: Failed to load module\n", filename);
if (NULL == mod)
{
if (errno) fprintf(stderr, "%s: Failed to load module, %s\n", filename, strerror(errno));
else fprintf(stderr, "%s: Failed to load module\n", filename);
exit(EXIT_FAILURE);
}
/* close file */
fclose(fp);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment