From 804df542960251e24be098e8ef52084e1faa3660 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 22 Sep 2019 19:36:22 +0200 Subject: [PATCH] LibC: Let's assert in rewind() that fseek()ing to the beginning worked --- Libraries/LibC/stdio.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Libraries/LibC/stdio.cpp b/Libraries/LibC/stdio.cpp index 531808f866..bce13c7f79 100644 --- a/Libraries/LibC/stdio.cpp +++ b/Libraries/LibC/stdio.cpp @@ -320,7 +320,9 @@ long ftell(FILE* stream) void rewind(FILE* stream) { - fseek(stream, 0, SEEK_SET); + ASSERT(stream); + int rc = fseek(stream, 0, SEEK_SET); + ASSERT(rc == 0); } int dbgprintf(const char* fmt, ...)