mirror of
https://github.com/ZDoom/wadext.git
synced 2024-11-24 21:01:21 +00:00
- when extracting multiple files with the same name, put the counter in the extension, not the base part.
This way the output can mostly be reused as-is, when put in the base it'd require user intervention to correct things.
This commit is contained in:
parent
065708b4ea
commit
5eecfa5947
1 changed files with 2 additions and 2 deletions
|
@ -96,7 +96,7 @@ bool isPatch(const char * n)
|
|||
nn[8] = 0;
|
||||
strupr(nn);
|
||||
|
||||
for (int i = 0; i<*l; i++)
|
||||
for (unsigned i = 0; i<*l; i++)
|
||||
{
|
||||
if (!strncmp(c, nn, 8)) return true;
|
||||
c += 8;
|
||||
|
@ -125,7 +125,7 @@ const char * MakeFileName(const char * base, const char * ext)
|
|||
|
||||
for(int i=0;;i++)
|
||||
{
|
||||
if (i > 0) sprintf(buffer,"%s(%d)%s", basebuffer, i, ext);
|
||||
if (i > 0) sprintf(buffer,"%s%s(%d)", basebuffer, ext, i);
|
||||
else sprintf(buffer, "%s%s", basebuffer, ext);
|
||||
strlwr(buffer);
|
||||
FILE *f = fopen(buffer, "rb");
|
||||
|
|
Loading…
Reference in a new issue