Skip to content

Commit 4e88137

Browse files
committed
Use the decoded ID of questions in to unmarshal ballot
1 parent a11f9f1 commit 4e88137

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)