diff --git a/null_test.ar b/null_test.ar index 42655cc..b2e4d55 100644 --- a/null_test.ar +++ b/null_test.ar @@ -1,2 +1,2 @@ null -"hello world" \ No newline at end of file +"hello\u0000world" \ No newline at end of file diff --git a/src/runtime/objects/string/string.c b/src/runtime/objects/string/string.c index 9c94abd..3a50288 100644 --- a/src/runtime/objects/string/string.c +++ b/src/runtime/objects/string/string.c @@ -1,6 +1,7 @@ #include "../object.h" #include #include +#include ArgonObject *ARGON_STRING_TYPE = NULL; ArgonObject *ARGON_STRING_BASE = NULL; @@ -13,7 +14,8 @@ void init_string_type() { } ArgonObject *init_string_object(char*data, size_t length) { - printf("%s\n", data); + fwrite(data, 1, length, stdout); + printf("\n"); ArgonObject * object = init_argon_object(); object->typeObject = ARGON_STRING_TYPE; object->baseObject = ARGON_STRING_BASE;