Add this comment because other places in OpenGL include the NULL terminator in the length.
Signed-off-by: Timothy Arceri <[email protected]> --- src/mesa/main/objectlabel.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mesa/main/objectlabel.c b/src/mesa/main/objectlabel.c index 7e39c92..0942f72 100644 --- a/src/mesa/main/objectlabel.c +++ b/src/mesa/main/objectlabel.c @@ -92,6 +92,11 @@ copy_label(char **labelPtr, char *label, int *length, int bufSize) { int labelLen = 0; + /* The KHR_debug spec says: + * + * "The actual number of characters written into <label>, + * excluding the null terminator, is returned in <length>." + */ if (*labelPtr) labelLen = strlen(*labelPtr); -- 1.7.9.5 _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
