gltrace: Prevent crash in _glGetDebugMessageLog_length (issue #140).
gltrace: Prevent crash in _glGetDebugMessageLog_length (issue #140).

The function was not being called correctly from glGetDebugMessageLog
(and others).

From the spec the GL function:

  lengths is an array provided by the application and count is the
  maximum number of message that the driver will report into attribute
  array (ie lengths). That mean if the driver report 3 messages only
  lengths[0 to 2] are valid, others part are not valid and could have
  random data.

schulmar/apitrace,tuanthng/apitrace,schulmar/apitrace,apitrace/apitrace,tuanthng/apitrace,trtt/apitrace,swq0553/apitrace,surround-io/apitrace,tuanthng/apitrace,tuanthng/apitrace,apitrace/apitrace,EoD/apitrace,schulmar/apitrace,surround-io/apitrace,joshua5201/apitrace,tuanthng/apitrace,surround-io/apitrace,trtt/apitrace,trtt/apitrace,surround-io/apitrace,EoD/apitrace,EoD/apitrace,joshua5201/apitrace,joshua5201/apitrace,joshua5201/apitrace,trtt/apitrace,schulmar/apitrace,swq0553/apitrace,schulmar/apitrace,joshua5201/apitrace,surround-io/apitrace,swq0553/apitrace,apitrace/apitrace,swq0553/apitrace,swq0553/apitrace,EoD/apitrace,apitrace/apitrace,EoD/apitrace,trtt/apitrace