Update of /cvsroot/gcblue/gcb_wx/src/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3755/src/common
Modified Files:
tcOptions.cpp tcStream.cpp
Log Message:
Index: tcStream.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcStream.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** tcStream.cpp 9 May 2004 20:40:22 -0000 1.6
--- tcStream.cpp 17 May 2004 00:38:53 -0000 1.7
***************
*** 78,83 ****
* Skips over count bytes from current read stream position
*/
! void tcStream::skip_read(unsigned char count)
{
std::stringstream::seekg(count, ios_base::cur);
}
--- 78,85 ----
* Skips over count bytes from current read stream position
*/
! void tcStream::skip_read(unsigned int count)
{
+ unsigned int maxSkip = (unsigned int)size() - std::stringstream::tellg();
+ if (count > maxSkip) count = maxSkip;
std::stringstream::seekg(count, ios_base::cur);
}
Index: tcOptions.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcOptions.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** tcOptions.cpp 9 May 2004 20:40:22 -0000 1.8
--- tcOptions.cpp 17 May 2004 00:38:53 -0000 1.9
***************
*** 133,136 ****
--- 133,144 ----
Serialize(true); // read option state from file (options.dat)
+ // work around for sound disable via text xml file, cleanup later
+ if (OptionStringExists("DisableSound"))
+ {
+ disableSound = true;
+ maOptionInfo[3].mnValue = 1;
+ Serialize(false);
+ }
+
return true;
}
|