paulpairbus / glintercept

Automatically exported from code.google.com/p/glintercept
0 stars 0 forks source link

StringMarkerGREMEDY doesn't work with null terminated strings if the length parameter is 0 #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Calling glStringMarkerGREMEDY(0, nullTerminatedString);

What is the expected output? What do you see instead?
The string in nullTerminatedString should be loged, instead the empty string is 
logged;

fix:
In ExtensionOverride.cpp::glStringMarkerGREMEDY change
string strMarker(((const char*)inputString, len));
to
string strMarker = len ? string((const char*)inputString, len) : string((const 
char*)inputString);

Original issue reported on code.google.com by NilsKr...@googlemail.com on 2 Oct 2012 at 10:06

GoogleCodeExporter commented 9 years ago
This fix may dramatically decrease performance, because some processors (like 
new Intel, AMDs etc) caching machine instructions and everyone branching 
disables this boost feature.

Original comment by nekit.ro...@gmail.com on 16 Oct 2012 at 7:51

GoogleCodeExporter commented 9 years ago
Should be fixed in 1.2

Original comment by dtrebi...@gmail.com on 3 Jun 2013 at 2:44