Skip to content

Commit 2a34c49

Browse files
authored
Merge pull request #145 from dedis/fix-id-decode
Use the decoded ID of questions to unmarshal ballot
2 parents cb0abb6 + 4e88137 commit 2a34c49

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

contracts/evoting/types/ballots.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,10 @@ func (b *Ballot) Unmarshal(marshalledBallot string, election Election) error {
6868
return xerrors.Errorf("a line in the ballot has length != 3: %s", line)
6969
}
7070

71-
_, err := base64.StdEncoding.DecodeString(question[1])
71+
questionID, err := base64.StdEncoding.DecodeString(question[1])
7272
if err != nil {
7373
return xerrors.Errorf("could not decode question ID: %v", err)
7474
}
75-
questionID := question[1]
7675

7776
q := election.Configuration.GetQuestion(ID(questionID))
7877

0 commit comments

Comments
 (0)