]> git.tdb.fi Git - gldbg.git/commitdiff
Bugfixes
authorMikko Rasa <tdb@tdb.fi>
Sat, 7 Nov 2009 11:02:47 +0000 (11:02 +0000)
committerMikko Rasa <tdb@tdb.fi>
Sat, 7 Nov 2009 11:02:47 +0000 (11:02 +0000)
source/gldbg.cpp
source/glprint.c
source/glstate.cpp
source/tracer.cpp

index b95f81d831d43d630556f0fa56ba7eae1c2cd833..d2ca85e6212b76cda3c1828e683e5462e122f9c0 100644 (file)
@@ -26,6 +26,7 @@ Application::RegApp<GlDbg> GlDbg::reg;
 GlDbg::GlDbg(int argc, char **argv):
        cmd_interp(*this),
        process(vector<string>(argv+1, argv+argc)),
+       buf_offset(0),
        flushing(false),
        got_sigchld(false)
 {
index 3f6db656ebb2064a620555b246d50bbaa8432b93..0081953d8b088de4998ecc8c62b5c6e8d91d499c 100644 (file)
@@ -74,6 +74,9 @@ static const char *print_array(const char *fmt, const void *data, unsigned elem_
        char *ptr;
        unsigned i;
 
+       if(!data)
+               return "NULL";
+
        for(cptr=fmt; (type<2 && *cptr); ++cptr)
        {
                if(*cptr=='%')
index ff8f3a2d8cd089dbec52f43a27a8c0e0dea2da01..90b0ac03ff34aaf14fe44761928cad16011aede5 100644 (file)
@@ -237,7 +237,7 @@ void GlState::glMultiTexCoord4f(void *user_data, unsigned index, float s, float
 
 void GlState::glActiveTexture(void *user_data, unsigned index)
 {
-       reinterpret_cast<GlState *>(user_data)->active_tex = index;
+       reinterpret_cast<GlState *>(user_data)->active_tex = index-GL_TEXTURE0;
 }
 
 void GlState::glBindTexture(void *user_data, GLenum target, unsigned id)
index 7ce00fea376d5052bb7f2d02bc34cf94bbf9f752..d92da29b92c84cf3e08bcc5c1e4e1b610df75284 100644 (file)
@@ -20,6 +20,7 @@ Tracer::Tracer():
 
 Tracer::~Tracer()
 {
+       delete glprint;
        if(delete_out)
                delete out;
 }