Skip to content

Commit 72d40da

Browse files
Fully Homomorphic Encryption Teamcopybara-github
authored andcommitted
Automated Code Change
PiperOrigin-RevId: 865312431
1 parent 026923f commit 72d40da

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

transpiler/examples/redact_ssn/redact_ssn.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ void RedactSsn(char my_string[MAX_LENGTH]) {
99
int consecutive_digits_p2 = 0;
1010

1111
#pragma hls_unroll yes
12-
for (int i = 0; i < MAX_LENGTH; i++) {
12+
for (int i = 0; i < MAX_LENGTH && my_string[i] != '\0'; i++) {
1313
if (my_string[i] >= '0' && my_string[i] <= '9') {
1414
consecutive_digits_p1++;
1515
consecutive_digits_p2++;

0 commit comments

Comments
 (0)