We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 026923f commit 72d40daCopy full SHA for 72d40da
1 file changed
transpiler/examples/redact_ssn/redact_ssn.cc
@@ -9,7 +9,7 @@ void RedactSsn(char my_string[MAX_LENGTH]) {
9
int consecutive_digits_p2 = 0;
10
11
#pragma hls_unroll yes
12
- for (int i = 0; i < MAX_LENGTH; i++) {
+ for (int i = 0; i < MAX_LENGTH && my_string[i] != '\0'; i++) {
13
if (my_string[i] >= '0' && my_string[i] <= '9') {
14
consecutive_digits_p1++;
15
consecutive_digits_p2++;
0 commit comments