| 498 | } |
| 499 | |
| 500 | void CAction::setSubString(char** P_target, const char* P_source, int P_start, int P_stop) |
| 501 | { |
| 502 | int sizeOf; |
| 503 | |
| 504 | if (P_source != nullptr) { |
| 505 | sizeOf = P_stop - P_start; |
| 506 | (*P_target) = new char[sizeOf + 1]; |
| 507 | |
| 508 | if (sizeOf > 0) { |
| 509 | memcpy((*P_target), &(P_source[P_start]), sizeOf); |
| 510 | } |
| 511 | |
| 512 | (*P_target)[sizeOf] = '\0'; |
| 513 | } else { |
| 514 | *P_target = nullptr ; |
| 515 | } |
| 516 | } |
| 517 | |
| 518 | |
| 519 | #ifdef PCAPPLAY |
nothing calls this directly
no outgoing calls
no test coverage detected