Further improve json / lua serialization

This commit is contained in:
Justine Tunney 2022-07-09 16:27:26 -07:00
parent 9e86980191
commit ee82cee432
10 changed files with 248 additions and 155 deletions

View file

@ -58,7 +58,9 @@ int AppendStrList(struct StrList *sl) {
}
void SortStrList(struct StrList *sl) {
qsort(sl->p, sl->i, sizeof(*sl->p), CompareStrings);
if (sl->i) {
qsort(sl->p, sl->i, sizeof(*sl->p), CompareStrings);
}
}
int JoinStrList(struct StrList *sl, char **buf, uint64_t sep) {