From d4bd64980fdf49349132a6bc30953735f8090f3e Mon Sep 17 00:00:00 2001 From: Eukara Date: Tue, 9 Nov 2021 16:53:31 +0000 Subject: [PATCH] plugin.c: Fix return values so it compiles with g++ properly. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6118 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- plugins/plugin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/plugin.c b/plugins/plugin.c index 1f52fd62e..406500173 100644 --- a/plugins/plugin.c +++ b/plugins/plugin.c @@ -124,7 +124,7 @@ qboolean VARGS Q_vsnprintfz (char *dest, size_t size, const char *fmt, va_list a plugfuncs->Error("Q_vsnprintfz: Truncation\n"); #endif //if ret is -1 (windows oversize, or general error) then it'll be treated as unsigned so really long. this makes the following check quite simple. - return ret>=size; + return (ret>=size) ? qtrue : qfalse; } //windows/linux have inconsistant snprintf //this is an attempt to get them consistant and safe @@ -152,7 +152,7 @@ qboolean VARGS Q_snprintfz (char *dest, size_t size, const char *fmt, ...) plugfuncs->Error("Q_vsnprintfz: Truncation\n"); #endif //if ret is -1 (windows oversize, or general error) then it'll be treated as unsigned so really long. this makes the following check quite simple. - return ret>=size; + return (ret>=size) ? qtrue : qfalse; } char *va(const char *format, ...) //Identical in function to the one in Quake, though I can assure you that I wrote it...