From feaeb6a0eab778d14532042e08c5f1e8f8c56f26 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 9 Apr 2026 21:02:26 -0700 Subject: [PATCH] Fix return values of some natives. (#2437) These are listed as returning void, but actually have non-void returns in their implementation and pre-methodmap signatures. --- plugins/include/admin.inc | 2 +- plugins/include/textparse.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/include/admin.inc b/plugins/include/admin.inc index b861c767..ffed13fa 100644 --- a/plugins/include/admin.inc +++ b/plugins/include/admin.inc @@ -175,7 +175,7 @@ methodmap AdminId { // @param name String buffer to store name. // @param maxlength Maximum size of string buffer. // @return Number of bytes written. - public native void GetUsername(char[] name, int maxlength); + public native bool GetUsername(char[] name, int maxlength); // Binds an admin to an identity for fast lookup later on. The bind must be unique. // diff --git a/plugins/include/textparse.inc b/plugins/include/textparse.inc index 1d8cc634..ea26a6e2 100644 --- a/plugins/include/textparse.inc +++ b/plugins/include/textparse.inc @@ -191,7 +191,7 @@ methodmap SMCParser < Handle // @param buffer A string buffer for the error (contents undefined on failure). // @param buf_max The maximum size of the buffer. // @return The number of characters written to buffer. - public native void GetErrorString(SMCError error, char[] buffer, int buf_max); + public native bool GetErrorString(SMCError error, char[] buffer, int buf_max); }; /**