gpgscm: Avoid mutating integer.

* tests/gpgscm/scheme.c (opexe_5): Do not modify the integer in-place
while printing an vector.  Integer objects may be shared, so they must
not be mutated.

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2017-04-06 16:24:49 +02:00
parent b83903f59e
commit f1dc34f502
No known key found for this signature in database
GPG Key ID: DD1A52F9DA8C9020
1 changed files with 1 additions and 1 deletions

View File

@ -5181,7 +5181,7 @@ static pointer opexe_5(scheme *sc, enum scheme_opcodes op) {
s_return(sc,sc->T);
} else {
pointer elem=vector_elem(vec,i);
ivalue_unchecked(cdr(sc->args))=i+1;
cdr(sc->args) = mk_integer(sc, i + 1);
s_save(sc,OP_PVECFROM, sc->args, sc->NIL);
sc->args=elem;
if (i > 0)