diff --git a/src/types.c b/src/types.c index cb660b2..66fa8e9 100644 --- a/src/types.c +++ b/src/types.c @@ -561,12 +561,12 @@ List createList() { void appendToList(List* list, GroundValue value) { if (list == NULL) { - printf("Expecting a List ptr, got a null pointer instead.\nThis is likely not an error with your Ground program.\nPlease report this issue to https://chsp.au/ground/cground\n"); + printf("Expecting a List ptr, got a null pointer instead.\nThis is likely not an error with your Ground program.\nPlease report this issue to https://chsp.au/ground/ground\n"); exit(EXIT_FAILURE); } GroundValue* ptr = realloc(list->values, (list->size + 1) * sizeof(GroundValue)); if (ptr == NULL) { - printf("There was an error allocating memory for a list.\nThis is likely not an error with your Ground program.\nPlease report this issue to https://chsp.au/ground/cground\n"); + printf("There was an error allocating memory for a list.\nThis is likely not an error with your Ground program.\nPlease report this issue to https://chsp.au/ground/ground\n"); exit(EXIT_FAILURE); } list->size++; @@ -576,7 +576,7 @@ void appendToList(List* list, GroundValue value) { ListAccess getListAt(List* list, size_t idx) { if (list == NULL) { - printf("Expecting a List ptr, got a null pointer instead.\nThis is likely not an error with your Ground program.\nPlease report this issue to https://chsp.au/ground/cground\n"); + printf("Expecting a List ptr, got a null pointer instead.\nThis is likely not an error with your Ground program.\nPlease report this issue to https://chsp.au/ground/ground\n"); exit(EXIT_FAILURE); } if (idx < list->size) { @@ -594,7 +594,7 @@ ListAccess getListAt(List* list, size_t idx) { ListAccessStatus setListAt(List* list, size_t idx, GroundValue value) { if (list == NULL) { - printf("Expecting a List ptr, got a null pointer instead.\nThis is likely not an error with your Ground program.\nPlease report this issue to https://chsp.au/ground/cground\n"); + printf("Expecting a List ptr, got a null pointer instead.\nThis is likely not an error with your Ground program.\nPlease report this issue to https://chsp.au/ground/ground\n"); exit(EXIT_FAILURE); } if (idx < list->size) { diff --git a/src/types.h b/src/types.h index 862ad4d..8a7e9c2 100644 --- a/src/types.h +++ b/src/types.h @@ -83,7 +83,7 @@ typedef struct GroundError { typedef struct GroundValue { GroundValueType type; struct GroundStruct* customType; - struct { + union { int64_t intVal; double doubleVal; char* stringVal; diff --git a/tests/log.txt b/tests/log.txt index 6d2e196..f81a313 100644 --- a/tests/log.txt +++ b/tests/log.txt @@ -1,5 +1,5 @@ -[hello, there, general, hello] +[hello, there, general, kenobi][hello, there, general, kenobi][hello, there, general, hello] hello there general - ,WV +Nqb˜V