From b63e97c9962464e4eef76e4a9827f12946c0e653 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Tue, 7 Oct 2025 06:05:07 +0000 Subject: [PATCH] fix arg git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@196 b9cfdab3-6d41-4d17-bbe4-086880011989 --- doc/index.html | 6 ++++-- include/Mw/Error.h | 2 +- src/error.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/index.html b/doc/index.html index cbd2395..7b74e24 100644 --- a/doc/index.html +++ b/doc/index.html @@ -165,7 +165,7 @@ MwEerror
- MwGetLastError() + MwGetLastError
Mw/Font.h @@ -1501,7 +1501,9 @@
-
MWDECL const char* MwGetLastError();
+
MWDECL const char* MwGetLastError (
+	void
+);
Get the last error. diff --git a/include/Mw/Error.h b/include/Mw/Error.h index 9e8a031..8da62a0 100644 --- a/include/Mw/Error.h +++ b/include/Mw/Error.h @@ -25,6 +25,6 @@ typedef enum MwErrorEnum_T { /*! * %brief Get the last error */ -MWDECL const char* MwGetLastError(); +MWDECL const char* MwGetLastError(void); #endif diff --git a/src/error.c b/src/error.c index e31f24d..a13ace5 100644 --- a/src/error.c +++ b/src/error.c @@ -7,7 +7,7 @@ // buffer for holding the error. +1 to ensure there's always a null terminator. char error[MAX_ERROR_LEN + 1] = {0}; -const char* MwGetLastError() { +const char* MwGetLastError(void) { return error; }