From a282fa918c6f41d648bd7d19f2a75920e35b189c Mon Sep 17 00:00:00 2001 From: Issac332 <119879937+Issac8658@users.noreply.github.com> Date: Thu, 16 Jul 2026 10:43:15 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gl-debug.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gl-debug.cpp b/src/gl-debug.cpp index 7bcb221..3fa2512 100644 --- a/src/gl-debug.cpp +++ b/src/gl-debug.cpp @@ -40,12 +40,14 @@ struct GLDebugLoggerPrivate{ void writeTimestamp(){ //https://stackoverflow.com/questions/9628637/how-can-i-get-rid-of-n-from-string-in-c time(×tamp); - char foo[strlen(ctime(×tamp)) - 1] = ctime(×tamp); - *stream << "[GLDEBUG] [" << foo << "]"; + char *foo = ctime(×tamp); + if (strlen(foo) > 0) // i dont want segfault, im afraid of it >m< + foo[strlen(foo) - 1] = '\0'; + *stream << "[GLDEBUG] [" << foo << "] "; } void writeLine(const char *line){ - *stream << line << "/n"; + *stream << line << "\n"; stream->flush(); } };