[Mesa-dev] [PATCH 7/7] mesa: HACK! tweak the MAX_DEBUG_MESSAGE_LENGTH limit
Emil Velikov
emil.l.velikov at gmail.com
Sun Nov 22 15:21:38 PST 2015
Based on one's interpretation of the spec one may say that length (when
non negative) either considers or doesn't the null terminator.
I'm leaning towards the latter case, although the CTS authors are
thinking about the former.
Hack this for now and think about it later :-)
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
src/mesa/main/errors.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c
index b10c421..63fd910 100644
--- a/src/mesa/main/errors.c
+++ b/src/mesa/main/errors.c
@@ -970,7 +970,7 @@ error:
static GLboolean
validate_length(struct gl_context *ctx, const char *callerstr, GLsizei length)
{
- if (length >= MAX_DEBUG_MESSAGE_LENGTH) {
+ if (length+1 >= MAX_DEBUG_MESSAGE_LENGTH) {
_mesa_error(ctx, GL_INVALID_VALUE,
"%s(length=%d, which is not less than "
"GL_MAX_DEBUG_MESSAGE_LENGTH=%d)", callerstr, length,
--
2.6.2
More information about the mesa-dev
mailing list