- if (parity != NULL && iLen != 0) {
- memcpy(trace + traceLen, parity, num_paritybytes);
- }
- traceLen += num_paritybytes;
-
- if(traceLen +4 < max_traceLen)
- { //If it hadn't been cleared, for whatever reason..
- memset(trace+traceLen,0x44, 4);
+ if (num_paritybytes != 0) {
+ if (parity != NULL) {
+ for (int i = 0; i < num_paritybytes; i++) {
+ trace[traceLen++] = *parity++;
+ }
+ } else {
+ for (int i = 0; i < num_paritybytes; i++) {
+ trace[traceLen++] = 0x00;
+ }
+ }