mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpgscm: Improve syntax checking.
* tests/gpgscm/scheme.c (opexe_0): Make sure closure arguments are symbols. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
ee715201ae
commit
4aab0e6ac7
1 changed files with 5 additions and 2 deletions
|
@ -3559,10 +3559,13 @@ static pointer opexe_0(scheme *sc, enum scheme_opcodes op) {
|
|||
is_pair(x); x = cdr(x), y = cdr(y)) {
|
||||
if (y == sc->NIL) {
|
||||
Error_1(sc, "not enough arguments, missing:", x);
|
||||
} else {
|
||||
} else if (is_symbol(car(x))) {
|
||||
new_slot_in_env(sc, car(x), car(y));
|
||||
}
|
||||
} else {
|
||||
Error_1(sc, "syntax error in closure: not a symbol", car(x));
|
||||
}
|
||||
}
|
||||
|
||||
if (x == sc->NIL) {
|
||||
if (y != sc->NIL) {
|
||||
Error_0(sc, "too many arguments");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue