diff options
Diffstat (limited to 'src/stage1/analyze.cpp')
| -rw-r--r-- | src/stage1/analyze.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/stage1/analyze.cpp b/src/stage1/analyze.cpp index 24530307a2..fd0de8e907 100644 --- a/src/stage1/analyze.cpp +++ b/src/stage1/analyze.cpp @@ -8052,13 +8052,10 @@ not_integer: } Error file_fetch(CodeGen *g, Buf *resolved_path, Buf *contents_buf) { - size_t len = 0xAA; + size_t len; const char *contents = stage2_fetch_file(&g->stage1, buf_ptr(resolved_path), buf_len(resolved_path), &len); - if (len == 0) { - // File exists but is empty (otherwise it would be 0xAA) - } else if (contents == nullptr) { + if (contents == nullptr) return ErrorFileNotFound; - } buf_init_from_mem(contents_buf, contents, len); return ErrorNone; } |
