diff options
author | David Shaw <[email protected]> | 2004-02-15 00:04:32 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2004-02-15 00:04:32 +0000 |
commit | 95d05215c380895448fd900c1952fbadb4649bec (patch) | |
tree | f6aa66ee5deaa2aac60bdb6b2f6bb872ba770e99 /g10/misc.c | |
parent | * keyserver.c (argsep): Move to misc.c. (diff) | |
download | gnupg-95d05215c380895448fd900c1952fbadb4649bec.tar.gz gnupg-95d05215c380895448fd900c1952fbadb4649bec.zip |
* build-packet.c (write_header2): If a suggested header length is provided
along with a zero length, interpret this as an actual zero length packet
and not as an indeterminate length packet. (do_comment, do_user_id): Use
it here as these packets might be naturally zero length.
* parse-packet.c (parse): Show packet type when failing due to an
indeterminate length packet.
* misc.c (parse_options): Only provide args for the true (i.e. not
"no-xxx") form of options.
Diffstat (limited to '')
-rw-r--r-- | g10/misc.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/g10/misc.c b/g10/misc.c index 01f34b4a9..500abaaa4 100644 --- a/g10/misc.c +++ b/g10/misc.c @@ -1,5 +1,5 @@ /* misc.c - miscellaneous functions - * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 + * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, * 2004 Free Software Foundation, Inc. * * This file is part of GnuPG. @@ -771,11 +771,17 @@ parse_options(char *str,unsigned int *options, } if(rev) - *options&=~opts[i].bit; + { + *options&=~opts[i].bit; + if(opts[i].value) + *opts[i].value=NULL; + } else - *options|=opts[i].bit; - if(opts[i].value) - *opts[i].value=arg?m_strdup(arg):NULL; + { + *options|=opts[i].bit; + if(opts[i].value) + *opts[i].value=arg?m_strdup(arg):NULL; + } break; } } |