Markus Amsler <[EMAIL PROTECTED]> writes: > This fixes bug http://bugs.winehq.org/show_bug.cgi?id=6286 > --- > programs/cmd/builtins.c | 22 ++++++++++++++++++++++ > 1 files changed, 22 insertions(+), 0 deletions(-) > diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c > index 3329a0b..0732170 100644 > --- a/programs/cmd/builtins.c > +++ b/programs/cmd/builtins.c > @@ -36,6 +36,12 @@ #define WIN32_LEAN_AND_MEAN > > #include "wcmd.h" > > +#define CHECK_FOR_ARGUMENT \ > + if (param1[0] == 0x00) { \ > + WCMD_output ("Argument missing\n"); \ > + return; \ > + } > + > void WCMD_execute (char *orig_command, char *parameter, char *substitution); > > struct env_stack > @@ -110,6 +116,8 @@ BOOL force, status; > static const char overwrite[] = "Overwrite file (Y/N)?"; > char string[8], outpath[MAX_PATH], inpath[MAX_PATH], *infile; > > + CHECK_FOR_ARGUMENT > + > if ((strchr(param1,'*') != NULL) && (strchr(param1,'%') != NULL)) {
This is ugly, you should use a normal function instead of a macro and do the return explicitly instead of hiding it in the macro (or even put the code in as is, it's only a couple of lines). -- Alexandre Julliard [EMAIL PROTECTED]