* Clears the given scriptInfo. * * @param scriptInfo The scriptInfo to clear. */
| 592 | * @param scriptInfo The scriptInfo to clear. |
| 593 | */ |
| 594 | void Script_ClearInfo(ScriptInfo *scriptInfo) |
| 595 | { |
| 596 | if (scriptInfo == NULL) return; |
| 597 | |
| 598 | if (scriptInfo->isAllocated != 0) { |
| 599 | free(scriptInfo->text); |
| 600 | free(scriptInfo->offsets); |
| 601 | free(scriptInfo->start); |
| 602 | } |
| 603 | |
| 604 | scriptInfo->text = NULL; |
| 605 | scriptInfo->offsets = NULL; |
| 606 | scriptInfo->start = NULL; |
| 607 | } |
| 608 | |
| 609 | /** |
| 610 | * Clears the given scriptInfo. |
no test coverage detected