Mercurial > hg > openttd
changeset 4464:5e4d40ff21a7 draft
(svn r6247) -Fix(r6244): invalid arguments caused infinite loop
author | glx <glx@openttd.org> |
---|---|
date | Wed, 30 Aug 2006 22:32:25 +0000 |
parents | 328c9fe06255 |
children | cd2b09e54303 |
files | strgen/strgen.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/strgen/strgen.c +++ b/strgen/strgen.c @@ -1285,12 +1285,17 @@ if (argc > 2 && (strcmp(argv[1], "-s") == 0 || strcmp(argv[1], "--source_dir") == 0)) { src_dir = replace_pathsep(argv[2]); argc -= 2, argv += 2; + continue; } if (argc > 2 && (strcmp(argv[1], "-d") == 0 || strcmp(argv[1], "--dest_dir") == 0)) { dest_dir = replace_pathsep(argv[2]); argc -= 2, argv += 2; + continue; } + + fprintf(stderr, "Invalid arguments\n"); + return 0; } if (dest_dir == NULL) dest_dir = src_dir; // if dest_dir is not specified, it equals src_dir