MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / Script_ClearInfo

Function Script_ClearInfo

src/script/script.c:594–607  ·  view source on GitHub ↗

* Clears the given scriptInfo. * * @param scriptInfo The scriptInfo to clear. */

Source from the content-addressed store, hash-verified

592 * @param scriptInfo The scriptInfo to clear.
593 */
594void 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.

Callers 2

GameLoop_UninitFunction · 0.85
Script_LoadFromFileFunction · 0.85

Calls 1

freeFunction · 0.85

Tested by

no test coverage detected