MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / GetString

Method GetString

Descent3/localization.cpp:741–760  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

739}
740
741void GrowString::GetString(char **str) {
742 *str = NULL;
743 int size = Length();
744 if (size == -1)
745 return;
746
747 tbufferinfo *next;
748 next = root.next;
749
750 *str = (char *)mem_malloc(size + 1);
751
752 strcpy(*str, root.string_data);
753 next = root.next;
754 while (next) {
755 if (next->string_data) {
756 strcat(*str, next->string_data);
757 }
758 next = next->next;
759 }
760}
761
762int GrowString::Length(void) {
763 if (!root.string_data)

Callers 5

CreateStringTableFunction · 0.80
LoadStringFileFunction · 0.80
operator+Method · 0.80
operator+=Method · 0.80
operator=Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected