Election-Tech-Initiative / electionguard-cpp

A C++ implementation of ElectionGuard specification focused on encryption components.
https://www.electionguard.vote/
MIT License
23 stars 26 forks source link

Change string handling to use begin and end instead of front #318

Closed SteveMaier-IRT closed 2 years ago

SteveMaier-IRT commented 2 years ago

Added unit test to make sure the extended data is not null

Issue

Link your PR to an issue

Fixes #296

Description

Removed the use of string.front since it is not valid when it is called on an empty string. Changed to using .begin and .end instead which is a more common practice.

Testing

Added a check to make sure that the extended data was not null when the contest was not overvoted or with write-ins.