[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pbmserv-dev] help with Get/Set Options in game.cpp



I believe there is an error in the game.cpp file.  Here is what is happening.
In this program I am working on (Quory/Quoridor) I allow two options to be
set: one option is grid (of either 'dots' or 'crosses') and the other option
is fences (of either 'thinfences' or 'thickfences')  Now here is the
Quory.options file:

dzander1:grid:crosses
dzander1:fences:thickfences

When I ask for the fence thickness I get the correct value ('thickfences')
but when I ask for the grid type I get this ('s:thickfences')
Something is wrong  with the game::GetOption(char *, char *) routine!!!
Notice that the value of 's:thickfences' starts at exactly where the 'c'
in the word 'crosses' would start (it lines up directly below the point
where the function would have retrieved the word 'crosses'.  Does this
make sense?  So I think what is happening is the function game::GetOption()
is retrieving the 15th character of the wrong line! (15th onward to EOL)  
The function is too confusing for me to figure it out what is wrong.  
Would one of you kind programmers help out?  TIA

--
 Douglas Zander