From: ehofman Date: Wed, 3 Mar 2004 19:48:28 +0000 (+0000) Subject: Some small fixes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a0251b32569389072f0abb6ea49b445ae35c8897;p=simgear.git Some small fixes --- diff --git a/simgear/scene/material/mat.cxx b/simgear/scene/material/mat.cxx index cd863d0e..76bb3820 100644 --- a/simgear/scene/material/mat.cxx +++ b/simgear/scene/material/mat.cxx @@ -209,9 +209,11 @@ SGMaterial::get_state (int n) } if ( _current_ptr >= _status.size()) - _current_ptr = 0; + ((SGMaterial *)this)->_current_ptr = 0; - return (n >= 0) ? _status[n].state : _status[_current_ptr++].state; + ssgSimpleState *st = (n >= 0) ? _status[n].state : _status[_current_ptr].state; + ((SGMaterial *)this)->_current_ptr += 1; + return st; }