diff --git a/cfgpatch.c b/cfgpatch.c index 5551351..1b6f94e 100644 --- a/cfgpatch.c +++ b/cfgpatch.c @@ -7,7 +7,7 @@ #include "filedata.h" /* - * $ cfgpatch + * $ cfgpatch */ int main(int argc, char *argv[]) { diff --git a/compress.c b/compress.c index 00318d8..419cd34 100644 --- a/compress.c +++ b/compress.c @@ -8,7 +8,7 @@ #include "romfile.h" /* - * $ compress + * $ compress */ int main(int argc, char *argv[]) { @@ -17,7 +17,10 @@ int main(int argc, char *argv[]) struct filedata *config = get_filedata(argv[2]); rom->size = lzs_pack(config->data, config->size, rom->data + 0xC, 0x1000); - put_romfile(argv[3], rom); + char outname[64]; + strncpy(outname, argv[2], sizeof(outname)); + strcat(outname, ".comp"); + put_romfile(outname, rom); free(config); free(rom); diff --git a/configdata.c b/configdata.c index b0f37d4..e803966 100644 --- a/configdata.c +++ b/configdata.c @@ -92,7 +92,7 @@ static struct cfg_patch patcharr[] = {{ .code = CFG_NETMASK, .patch = patch_8bit, .offset = 0x2dfe, - .min = 0x00, .max = 0x20, + .min = 0, .max = 32, }, { .code = CFG_NAMESERVER, .patch = patch_ip, @@ -101,7 +101,7 @@ static struct cfg_patch patcharr[] = {{ .code = CFG_MACAGEING, .patch = patch_16bit, .offset = 0x53e8, - .min = 0, .max = 0xFFFF, + .min = 0, .max = 65536, }, { .code = CFG_PORTNAME_MASK, .mask = 0xFFFFFFE0,