Update of /cvsroot/playerstage/code/player/client_libs/libplayerc++
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19666/client_libs/libplayerc++

Modified Files:
        playerc++.h 
Log Message:
prevent segfault when getting ranges from sonar proxy with no data


Index: playerc++.h
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc++/playerc++.h,v
retrieving revision 1.108
retrieving revision 1.109
diff -C2 -d -r1.108 -r1.109
*** playerc++.h 30 Jan 2008 02:06:46 -0000      1.108
--- playerc++.h 4 Feb 2008 19:54:27 -0000       1.109
***************
*** 2309,2313 ****
      /// return a particular scan value
      double GetScan(uint32_t aIndex) const
!       { return GetVar(mDevice->scan[aIndex]); };
      /// This operator provides an alternate way of access the scan data.
      /// For example, SonarProxy[0] == SonarProxy.GetRange(0)
--- 2309,2313 ----
      /// return a particular scan value
      double GetScan(uint32_t aIndex) const
!       { if (GetVar(mDevice->scan_count) <= aIndex) return -1; return 
GetVar(mDevice->scan[aIndex]); };
      /// This operator provides an alternate way of access the scan data.
      /// For example, SonarProxy[0] == SonarProxy.GetRange(0)


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to