diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-12-24 19:04:37 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-12-24 19:06:23 -0500 |
| commit | cb336b312e7012dc05fe7d8ac1c0e924dbc6c840 (patch) | |
| tree | d2b8242e46452d12bfb1f7812f6965e64ddf9dfa /src/stdlib/c_strings.c | |
| parent | 649977aae7e5922f992cd69eb84da0a2db368580 (diff) | |
Shuffle dependencies around so header files aren't needed after tomo has
been compiled
Diffstat (limited to 'src/stdlib/c_strings.c')
| -rw-r--r-- | src/stdlib/c_strings.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stdlib/c_strings.c b/src/stdlib/c_strings.c index cbe46b68..d581c220 100644 --- a/src/stdlib/c_strings.c +++ b/src/stdlib/c_strings.c @@ -7,6 +7,7 @@ #include <stdio.h> #include <stdlib.h> +#include "fail.h" #include "integers.h" #include "siphash.h" #include "stdlib.h" @@ -60,7 +61,8 @@ static void CString$deserialize(FILE *in, void *out, List_t *pointers, const Typ int64_t len = -1; Int64$deserialize(in, &len, pointers, &Int64$info); char *str = GC_MALLOC_ATOMIC((size_t)len + 1); - if (fread(str, sizeof(char), (size_t)len, in) != (size_t)len) fail("Not enough data in stream to deserialize"); + if (fread(str, sizeof(char), (size_t)len, in) != (size_t)len) + fail_text(Text("Not enough data in stream to deserialize")); str[len + 1] = '\0'; *(const char **)out = str; } |
