Browse Source

Fix for Windows (MingW) where dirname modifies the passed buffer

tags/v1.1
Bernhard Fröhlich 11 months ago
parent
commit
222eddac8a
Signed by: Bernhard Froehlich <decke@bluelife.at> GPG Key ID: 4DD88C3F9F3B8333
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      drmdecrypt.c

+ 4
- 1
drmdecrypt.c View File

@@ -477,7 +477,10 @@ int main(int argc, char *argv[])

/* set and verify outdir */
if(strlen(outdir) < 1)
strcpy(outdir, dirname(argv[optind]));
{
strcpy(outdir, argv[optind]);
strcpy(outdir, dirname(outdir));
}

if(outdir[strlen(outdir)-1] != '/')
strcat(outdir, "/");

Loading…
Cancel
Save